package ua.nure.jfn.task4;

import java.util.Locale;
import java.util.ResourceBundle;
import java.util.Scanner;

public class Part3 {

	private static final String BASE_NAME = "resources";

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);

		String input;
		while (scanner.hasNextLine()) {
			input = scanner.nextLine();

			if (input.equalsIgnoreCase("stop")) {
				break;
			}

			String[] parts = input.split(" ");

			Locale locale = new Locale(parts[1]);
			ResourceBundle bundle = ResourceBundle.getBundle(BASE_NAME, locale);
			System.out.println(bundle.getString(parts[0]));
		}
	}
}
