import java.util.HashMap;
import java.util.LinkedList;
public class MyQueue {
private static LinkedList<String> queue1 = new LinkedList<String>();
private static LinkedList<String> queue2 = new LinkedList<String>();
public static void put(String value) {
if (value.length() == 1) {
queue1.add(value);
} else {
queue2.add(value);
}
}
public static String get() {
if (!queue2.isEmpty()) {
return queue2.removeFirst();
} else if (!queue1.isEmpty()) {
return queue1.removeFirst();
} else {
return "queue is empty";
}
}
}