public class Main{ private static int rd()throws java.io.IOException{ int a=0,b=0; while(true){ a=System.in.read(); if(a==0 || a==-1 || a=='\r' || a=='\n') break; if(a<(int)'0' || a>(int)'9')continue; a-=(int)'0'; b=b*10+a; } return b; } public static void main(String[] args)throws java.io.IOException{ int a=rd(); if(a<1 || a>30)return; for(int i=0;i