//import java.util.*;
//public class Main {
// public static void main(String[] args) {
// ArrayList<String> a = new ArrayList<String>();
//
// Scanner scanner = new Scanner(System.in);
// float sum = 0;
// System.out.print("enter 6 grades with space between them>>");
// for(int i=0; i<6;i++) {
// String s = scanner.next();
// a.add(s);
// }
// for (int i=0;i<a.size();i++) {
// if(a.get(i).equals("A")) {
// sum+=4.0;
// }
// if(a.get(i).equals("B")) {
// sum+=3.0;
// }
// if(a.get(i).equals("C")) {
// sum+=2.0;
// }
// if(a.get(i).equals("D")) {
// sum+=1.0;
// }
// if(a.get(i).equals("F")) {
// sum+=0;
// }
// }
// System.out.println(sum/a.size());
// }
//}
//import java.util.*;
//public class Main {
// public static void main(String[] args) {
// HashMap<String, Integer> nations = new HashMap<String, Integer>();
// System.out.println("enter name of the nation and the population.(ex: Korea 5000)");
//
// Scanner scanner = new Scanner(System.in);
// while (true) {
// System.out.print("nation, population >> ");
// String nation = scanner.next();
// if(nation.equals("stop")) {
// break;
// }
// int population = scanner.nextInt();
// nations.put(nation, (int) population);
//
// }
// while (true) {
// System.out.print("Search population >> ");
// String searchNation = scanner.next();
// if(searchNation.equals("stop")) {
// break;
// }
// if(nations.containsKey(searchNation)) {
// System.out.println("The population of " + searchNation + " is " + nations.get(searchNation));
// }
// if(nations.get(searchNation)==null) {
// System.out.println(searchNation + " does not exist.");
// }
// }
// }
//}
//import java.util.Scanner;
//import java.util.Vector;
//public class Main {
// public static void main(String[] args) {
// Vector<Integer> v = new Vector<Integer>();
// Scanner scanner = new Scanner(System.in);
// for (;;) {
// System.out.print("강수량 입력 >> ");
// int rain = scanner.nextInt();
// if(rain==0) {
// break;
// }
// v.add(rain);
// int sum = 0;
// for (int i=0; i<v.size(); i++) {
// int n = v.get(i);
// System.out.println(n + " ");
// sum += n;
// }
// System.out.println("current average: " + sum/v.size());
// }
// }
//}
//import java.util.*;
//class Student {
// String name;
// String major;
// int year;
// String gpa;
//}
//public class Main {
// public static void main(String[] args) {
// Scanner scanner = new Scanner(System.in);
// ArrayList<Student> s = new ArrayList<Student>();
// System.out.println("Enter student name, major, year, and gpa.");
//
// for (int i=0; i<4; i++) {
// System.out.print(">> ");
// Student st = new Student();
// String a =scanner.nextLine();
// String ss[] = a.split(", ");
// st.name = ss[0];
// st.major = ss[1];
// st.year = Integer.valueOf(ss[2]);
// st.gpa = ss[3];
// s.add(st);
// }
// for (int i=0;i<s.size();i++) {
// System.out.println("------------------------");
// System.out.println("Name: " + s.get(i).name);
// System.out.println("Major: " + s.get(i).major);
// System.out.println("Year: " + s.get(i).year);
// System.out.println("GPA: " + s.get(i).gpa);
// }
// System.out.println("-------------------------");
// while (true) {
// System.out.print("Student name: ");
// String name1 = scanner.next();
// if (name1.equals("stop")) {
// break;
// }
// for(int i=0;i<s.size();i++) {
// Student n = s.get(i);
// if (n.name.equals(name1)) {
// System.out.println(n.name +", "+ n.major + ", " + n.year+ ", " + n.gpa);
// }
// }
// }
// }
//}
//import java.util.*;
//
//class Location{
// String city;
// String longitude;
// String latitude;
//}
//public class Main {
// public static void main(String[] args) {
// HashMap<String, Location> map = new HashMap<String, Location>();
// System.out.println("Enter city, longitude, and latitude.");
// Scanner scanner = new Scanner(System.in);
// for (int i=0; i<4; i++) {
// System.out.print(">> ");
// Location st = new Location();
// String a = scanner.nextLine();
// String ss[] = a.split(", ");
// st.city = ss[0];
// st.longitude = ss[1];
// st.latitude = ss[2];
// map.put(st.city, st);
// }
// System.out.println("-------------------------");
// Set<String> keys = map.keySet();
// Iterator<String> it = keys.iterator();
// while(it.hasNext()) {
// String key = it.next();
// Location value = map.get(key);
// System.out.println(value.city + " " + value.longitude + " " + value.latitude);
// }
// System.out.println("-------------------------");
//
// while(true) {
// System.out.print("City name: ");
// String city1 = scanner.next();
// if(city1.equals("stop")) {
// break;
// }
// Location city2 = map.get(city1);
// if(city2 == null) {
// System.out.println(city1 + " does not exist.");
// }
// else {
// System.out.println(city2.city+" "+city2.longitude+" "+city2.latitude);
// }
// }
// }
//}