public void solve() throws IOException {
    int n = nextInt();
    int[] a = new int[n];
    for (int x = 0; x < n; x++)
      a[x] = nextInt();
    int m = nextInt();
    for (int x = 0; x < m; x++) {
      int wire = nextInt() - 1;
      int bird = nextInt();
      shoot(a, wire, bird);
    }
    for (int x = 0; x < n; x++) {
      System.out.println(a[x]);
    }
  }