{"problem":{"name":"Range Swap","description":{"content":"You are given a sequence $A=(A_1,A_2,\\ldots,A_N)$ of length $N$ and positive integers $P,Q,R$, and $S$.   Here, $P,Q,R$, and $S$ satisfy $1\\leq P\\leq Q<R\\leq S \\leq N$ and $Q-P=S-R$. Let $B=(B_1, B_2,","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc286_a"},"statements":[{"statement_type":"Markdown","content":"You are given a sequence $A=(A_1,A_2,\\ldots,A_N)$ of length $N$ and positive integers $P,Q,R$, and $S$.  \nHere, $P,Q,R$, and $S$ satisfy $1\\leq P\\leq Q<R\\leq S \\leq N$ and $Q-P=S-R$.\nLet $B=(B_1, B_2,\\ldots, B_N)$ be the sequence obtained by swapping the $P$\\-th through $Q$\\-th terms and the $R$\\-th through $S$\\-th terms of $A$.  \nPrint the sequence $B$.\n\n## Constraints\n\n*   $1\\leq N \\leq 100$\n*   $1\\leq A_i\\leq 100$\n*   $1\\leq P\\leq Q<R\\leq S \\leq N$\n*   $Q-P=S-R$\n*   All values in the input are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$ $P$ $Q$ $R$ $S$\n$A_1$ $A_2$ $\\ldots$ $A_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc286_a","tags":[],"sample_group":[["8 1 3 5 7\n1 2 3 4 5 6 7 8","5 6 7 4 1 2 3 8\n\nSwapping the $1$\\-st through $3$\\-rd terms $(1,2,3)$ and the $5$\\-th through $7$\\-th terms $(5,6,7)$ of the sequence $A=(1,2,3,4,5,6,7,8)$ results in $B=(5,6,7,4,1,2,3,8)$, which should be printed with spaces in between."],["5 2 3 4 5\n2 2 1 1 1","2 1 1 2 1\n\nThe same integer may occur multiple times in the sequence."],["2 1 1 2 2\n50 100","100 50"],["10 2 4 7 9\n22 75 26 45 72 81 47 29 97 2","22 47 29 97 72 81 75 26 45 2"]],"created_at":"2026-03-03 11:01:14"}}