output_description: Print all elements of the list in order after performing given operations.
  Print an element in a line.
input_description: The input is given in the following format.
  
      
      
      $q$
      $query_1$
      $query_2$
      :
      $query_q$
      
  
  Each query $query_i$ is given by
  
      
      
      0 $x$
      
  
  or
  
      
      
      1 $d$
      
  
  or
  
      
      
      2
      
  
  where the first digits 0, 1 and 2 represent insert, move and erase operations
  respectively.
attempt: # coding=utf-8
  
  A = []
  cursor = 0
  
  N = int(input())
  for i in range(N):
      query = map(int, input().split())
      if query[0] == 0:
          A.insert(cursor, query[1])
      elif query[0] == 1:
          cursor += query[1]
      elif query[0] == 2:
          A.pop(cursor)
  [print(x) for x in A]
  
problem_description: List
  
  For a dynamic list $L$ of integers, perform a sequence of the following
  operations. $L$ has a special element called END at the end of the list and an
  element of $L$ is indicated by a cursor.
  
    * insert($x$): Insert $x$ before the element indicated by the cursor. After this operation, the cursor points the inserted element.
    * move($d$): Move the cursor to the end by $d$, if $d$ is positive. Move the cursor to the front by $d$, if $d$ is negative.
    * erase(): Delete the element indicated by the cursor. After this operation, the cursor points the element next to the deleted element. In case there is no such element, the cursor should point END. 
  
  In the initial state, $L$ is empty and the cursor points END.
samples: [{"input": "5\n    0 1\n    0 2\n    0 3\n    1 1\n    2", "output": "3\n    1"}]