import java.io.*;
import java.util.*;
public class problem1
{
  public static void main (String args [] ) throws IOException
  {
    Scanner in = new Scanner (new File ("DATA1.txt"));
    PrintWriter pw = new PrintWriter(new FileWriter ("OUT1.txt"));
    
    for (int i = 0; i < 5; i++ )
    {
        String input = in.nextLine();
        //System.out.println(input);
        char[] c = input.toCharArray();
        for ( int j = 0; j < c.length; j++ )
        {       
            if ( c[j] == 'A' )
            {
                c[j] = 'N';
            }
            else if ( c[j] == 'B' )
            {
                c[j] = 'O';
            }
            else if ( c[j] == 'C' )
            {
                c[j] = 'P';
            }
            else if ( c[j] == 'D' )
            {
                c[j] = 'Q';
            }
            else if ( c[j] == 'E' )
            {
                c[j] = 'R';
            }
            else if ( c[j] == 'F' )
            {
                c[j] = 'S';
            }
            else if ( c[j] == 'G' )
            {
                c[j] = 'T';
            }
            else if ( c[j] == 'H' )
            {
                c[j] = 'U';
            }
            else if ( c[j] == 'I' )
            {
                c[j] = 'V';
            }
            else if ( c[j] == 'J' )
            {
                c[j] = 'W';
            }
            else if ( c[j] == 'K' )
            {
                c[j] = 'X';
            }
            else if ( c[j] == 'L' )
            {
                c[j] = 'Y';
            }
            else if ( c[j] == 'M' )
            {
                c[j] = 'Z';
            }
            else if ( c[j] == 'N' )
            {
                c[j] = 'A';
            }
            else if ( c[j] == 'O' )
            {
                c[j] = 'B';
            }
            else if ( c[j] == 'P' )
            {
                c[j] = 'C';
            }
            else if ( c[j] == 'Q' )
            {
                c[j] = 'D';
            }
            else if ( c[j] == 'R' )
            {
                c[j] = 'E';
            }
            else if ( c[j] == 'S' )
            {
                c[j] = 'F';
            }
            else if ( c[j] == 'T' )
            {
                c[j] = 'G';
            }
            else if ( c[j] == 'U' )
            {
                c[j] = 'H';
            }
            else if ( c[j] == 'V' )
            {
                c[j] = 'I';
            }
            else if ( c[j] == 'W' )
            {
                c[j] = 'J';
            }
            else if ( c[j] == 'X' )
            {
                c[j] = 'K';
            }
            else if ( c[j] == 'Y' )
            {
                c[j] = 'L';
            }
            else if ( c[j] == 'Z' )
            {
                c[j] = 'M';
            }
            
            else if ( c[j] == 'a' )
            {
                c[j] = 'n';
            }
            else if ( c[j] == 'b' )
            {
                c[j] = 'o';
            }
            else if ( c[j] == 'c' )
            {
                c[j] = 'p';
            }
            else if ( c[j] == 'd' )
            {
                c[j] = 'q';
            }
            else if ( c[j] == 'e' )
            {
                c[j] = 'r';
            }
            else if ( c[j] == 'f' )
            {
                c[j] = 's';
            }
            else if ( c[j] == 'g' )
            {
                c[j] = 't';
            }
            else if ( c[j] == 'h' )
            {
                c[j] = 'u';
            }
            else if ( c[j] == 'i' )
            {
                c[j] = 'v';
            }
            else if ( c[j] == 'j' )
            {
                c[j] = 'w';
            }
            else if ( c[j] == 'k' )
            {
                c[j] = 'x';
            }
            else if ( c[j] == 'l' )
            {
                c[j] = 'y';
            }
            else if ( c[j] == 'm' )
            {
                c[j] = 'z';
            }
            else if ( c[j] == 'n' )
            {
                c[j] = 'a';
            }
            else if ( c[j] == 'o' )
            {
                c[j] = 'b';
            }
            else if ( c[j] == 'p' )
            {
                c[j] = 'c';
            }
            else if ( c[j] == 'q' )
            {
                c[j] = 'd';
            }
            else if ( c[j] == 'r' )
            {
                c[j] = 'e';
            }
            else if ( c[j] == 's' )
            {
                c[j] = 'f';
            }
            else if ( c[j] == 't' )
            {
                c[j] = 'g';
            }
            else if ( c[j] == 'u' )
            {
                c[j] = 'h';
            }
            else if ( c[j] == 'v' )
            {
                c[j] = 'i';
            }
            else if ( c[j] == 'w' )
            {
                c[j] = 'j';
            }
            else if ( c[j] == 'x' )
            {
                c[j] = 'k';
            }
            else if ( c[j] == 'y' )
            {
                c[j] = 'l';
            }
            else if ( c[j] == 'z' )
            {
                c[j] = 'm';
            }
        }
        
        pw.println(c);
    }
    in.close();
    pw.close();
  }
}
