public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
			char[] str = input.nextLine().toCharArray();
			for (int i = 0; i < str.length;i++) {
				for (int j = 0; j < str.length; j++) {
					for (int j2 = 0; j2 < str.length; j2++) {
						System.out.println(""+str[i]+str[j]+str[j2]);
					}
				}
			}
	}