import java.io.*; import java.util.*; import java.awt.geom.*; /** * Solution to Perfect Shuffle * * @author vanb */ public class shuffle_vanb { public Scanner sc; public PrintStream ps; /** * Driver. * @throws Exception */ public void doit() throws Exception { sc = new Scanner( System.in ); //new File( "shuffle.judge" ) ); ps = System.out; //new PrintStream( new FileOutputStream( "shuffle.solution" ) ); String cards[] = new String[1000]; for(;;) { int n = sc.nextInt(); if( n==0 ) break; for( int i=0; i