import java.io.*; import java.util.*; import java.awt.geom.*; /** * Solution to Ping! * * @author vanb */ public class ping_vanb { public Scanner sc; public PrintStream ps; /** * Driver. * @throws Exception */ public void doit() throws Exception { sc = new Scanner( System.in ); //new File( "ping.judge" ) ); ps = System.out; //new PrintStream( new FileOutputStream( "ping.solution" ) ); for(;;) { char pings[] = sc.next().toCharArray(); if( pings.length==1 ) break; // All of the satellites have unique ping times, and they all start at 0. // So, skipping time 0, if the earliest ping you see is at time k, // then there has to be a satellite pinging at k. Furthermore, that has // to be the fastest pinging satellite. String results = ""; for( int i=1; i