program coding; var code : array['A'..'Z'] of string; d : array[1..4] of integer; x,y : string; i,j : integer; procedure initialize; begin code['A'] := '.-'; code['B'] := '-...'; code['C'] := '-.-.'; code['D'] := '-..'; code['E'] := '.'; code['F'] := '..-.'; code['G'] := '--.'; code['H'] := '....'; code['I'] := '..'; code['J'] := '.---'; code['K'] := '-.-'; code['L'] := '.-..'; code['M'] := '--'; code['N'] := '-.'; code['O'] := '---'; code['P'] := '.--.'; code['Q'] := '--.-'; code['R'] := '.-.'; code['S'] := '...'; code['T'] := '-'; code['U'] := '..-'; code['V'] := '...-'; code['W'] := '.--'; code['X'] := '-..-'; code['Y'] := '-.--'; code['Z'] := '--..'; end; begin initialize; write('Input a word: '); readln(x); for i := 1 to length(x) do begin write(code[x[i]],' '); end; readln; write('Input a code: '); readln(y); for i := 1 to length(y) do if y[i] = ' ' then begin for j:=1 to i-1 do d[j]=y[j] end.