for(int c,k;;write(c,k<1?endl:none))k=(3k+(c=(int)getc(stdin)))%7;