/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		String input = "hello how are you";
    List<String> pairs = new ArrayList<>();
    for (int i = 0; i < input.length(); ++i) {
      // Skip over non-alphabetic characters.
      if (!Character.isAlphabetic(input.charAt(i))) continue;

      // Look for the next alphabetic character:
      for (int j = i + 1; j < input.length(); ++j) {
        // Skip over non-alphabetic characters.
        if (!Character.isAlphabetic(input.charAt(j))) continue;      

        // You've now found a pair.
        pairs.add("" + input.charAt(i) + input.charAt(j));
        break;
      }
    }
    System.out.println(pairs);
	}
}