function laba5_p(N,epsi,s)
    %T4P
    M = epsi^N-1;
    
    n = 0:N-1;
    k = 0:N-1;
    
    Q = zeros(N,N);
    Q(1,1) = 1;
    for j=2:N 
        Q(N+2-j, j)=1;
    end
    
    T = mod(epsi.^(n'*k),M);
    To = Q*T;
    
    A = mod((T*s')', M)
    R = obratnoe(N, M)
    S = mod(A*To*R,M)

end