uses
	math;

label
	restart;

var
	i, j, u, l: longint;
	s: array [1..26] of string;
	txt, enc: string;
	n: longint;
	ok: boolean;
	retries: longint;
	f: longint;
	r: longint;

begin
	randseed := 881276345;

	n := 1000;
	f := 10;

	restart:
	for i := 1 to f do begin
		s[i] := '';
		r := random(1024);
		for j := 1 to 10 do begin
			if (r and (1 shl (j - 1))) = 0 then
				s[i] := '0' + s[i]
			else
				s[i] := '1' + s[i];
		end;
	end;

	txt := '';
	for i := 1 to n do begin
		txt := txt + 'abcdefghijklmnopqrstuvwxyz'[random(f) + 1];
	end;

	enc := '';
	for j := 1 to n do begin
		enc := enc + s[ord(txt[j]) - ord('a') + 1];
	end;

	writeln(txt);
	writeln(enc);
end.