import java.util.*; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); in.nextLine(); String str = in.nextLine(); //LinkedList模拟屏幕,addFirst,addLast,removeFirst,removeLast方法简明直译 Linked...