Public static void main(String[] args) { Scanner scan = new Scanner(System.in); String[] sentence = { null, null, null, null }; for (int i = 0; i < 4; i++)
{ sentence[i] = scan.nextLine(); } for (String s : sentence)
{ System.out.println(s.split(" ")[0]); }}