import java.util.Scanner; import java.util.LinkedList; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String originS = sc.nextLine(); String[] splitS = originS.split(" "); LinkedList<...