Var
   b: boolean;
   i,j,t: longint;
   c: array [1..4] of longint;
   sec: array [1..4, 1..4] of char;

Function busca(ch: char; j: longint): longint;
         var i: longint;
         begin
         for i:= 1 to 4 do
             if (sec[j,i] = ch) then
                break;
         Inc(c[i]);
         busca:= 1 shl (i-1);
         end;

Begin
     for j:= 1 to 3 do
         for i:= 1 to 4 do
             begin
             read(input, sec[j,i]);
             if (i mod 2 = 0) then
                readln(input);
             end;
     b:= true;
     fillchar(sec[4], sizeof(sec[4]), '.');
     for i:= 1 to 4 do
         if (sec[1,i] <> '.') then
            begin
            fillchar(c, sizeof(c), 0);
            Inc(c[i]);
            t:= (1 shl (i-1)) OR busca(sec[1,i], 2) OR busca(sec[1,i], 3);
            case t of
                 // Casos con 1 o 3
                 1,14: if (sec[4,1]= '.') then sec[4,1]:= sec[1,i]
                                          else b:= false;
                 2,13: if (sec[4,2]= '.') then sec[4,2]:= sec[1,i]
                                          else b:= false;
                 4,11: if (sec[4,3]= '.') then sec[4,3]:= sec[1,i]
                                          else b:= false;
                 7, 8: if (sec[4,4]= '.') then sec[4,4]:= sec[1,i]
                                          else b:= false;
                 // Casos con 2
                 3,5,6,9,10,12:
                       for j:= 1 to 4 do
                           if (c[j]= 1) then
                              if (sec[4,j]= '.') then sec[4,j]:= sec[1,i]
                                                 else b:= false;
                 end;
            end;
     if (not b) then
        begin
        writeln(output, 'No se puede =(');
        exit;
        end;
     for i:= 1 to 4 do
         begin
         write(output, sec[4,i]);
         if (i mod 2 = 0) then
            writeln(output);
         end;
     writeln(output);
End.

