CF863D Yet Another Array Queries Problem

Description

You are given an array $ a $ of size $ n $ , and $ q $ queries to it. There are queries of two types: - $ 1 $ $ l_{i} $ $ r_{i} $ — perform a cyclic shift of the segment $ [l_{i},r_{i}] $ to the right. That is, for every $ x $ such that $ l_{i}

Input Format

The first line contains three integer numbers $ n $ , $ q $ and $ m $ ( $ 1

Output Format

Print $ m $ numbers, $ i $ -th of which is equal to the number at index $ b_{i} $ after all queries are done.