import java.io.*; import java.util.StringTokenizer; public class text{ static void main(String argumendid[]) throws IOException{ // System.out.println(Programm valjastab a tahega algavad sonad sinu sisestatud tekstist.); // String lause=Tekstiabi.kysiVastus("Palun lause:"); // if(lause.startsWith("a"))System.out.println(lause); BufferedReader br=new BufferedReader( new InputStreamReader(System.in) ); // String rida=br.readLine(); // if(rida.startsWith("a"))System.out.println(rida); String fail=br.readLine(); StringTokenizer st=new StringTokenizer(fail," "); while(st.hasMoreTokens()){ String uus=st.nextToken(); if(uus.startsWith("a"))System.out.println(uus); // System.out.println(st.nextToken()); } } }