public class Main {
    public static void main(String[] args) throws IOException{
            BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
            String s = in.readLine();
            for (int i =1; i < 6; i++) {
                switch (i){
                    case 1:
                        System.out.printf("    %s\n",s);
                        continue;
                    case 2:
                        System.out.printf("   %s %s\n",s,s);
                        continue;
                    case 3:
                        System.out.printf("  %s %s %s\n",s,s,s);
                        continue;
                    case 4:
                        System.out.printf(" %s %s %s %s\n",s,s,s,s);
                        continue;
                    case 5:
                        System.out.printf("%s %s %s %s %s\n",s,s,s,s,s);
                        continue;
                }
            }
    }
}