Shaass has decided to hunt some birds. There are n horizontal electricity wires aligned parallel to each other. Wires are numbered 1 to n from top to bottom. On each wire there are some oskols sitting next to each other. Oskol is the name of a delicious kind of birds in Shaass's territory. Supposed there are a_{i} oskols sitting on the i-th wire. $40$ 

Sometimes Shaass shots one of the birds and the bird dies (suppose that this bird sat at the i-th wire). Consequently all the birds on the i-th wire to the left of the dead bird get scared and jump up on the wire number i - 1, if there exists no upper wire they fly away. Also all the birds to the right of the dead bird jump down on wire number i + 1, if there exists no such wire they fly away. 

Shaass has shot m birds. You're given the initial number of birds on each wire, tell him how many birds are sitting on each wire after the shots.


-----Input-----

The first line of the input contains an integer n, (1 ≤ n ≤ 100). The next line contains a list of space-separated integers a_1, a_2, ..., a_{n}, (0 ≤ a_{i} ≤ 100). 

The third line contains an integer m, (0 ≤ m ≤ 100). Each of the next m lines contains two integers x_{i} and y_{i}. The integers mean that for the i-th time Shaass shoot the y_{i}-th (from left) bird on the x_{i}-th wire, (1 ≤ x_{i} ≤ n, 1 ≤ y_{i}). It's guaranteed there will be at least y_{i} birds on the x_{i}-th wire at that moment.


-----Output-----

On the i-th line of the output print the number of birds on the i-th wire.


-----Examples-----
Input
5
10 10 10 10 10
5
2 5
3 13
2 12
1 13
4 6

Output
0
12
5
0
16

Input
3
2 4 1
1
2 2

Output
3
0
3

Difficulty: EASY

Solutions:
3
n = int(input())
a = list(map(int, input().split()))
m = int(input())
for _ in range(m):
	(x, y) = list(map(int, input().split()))
	if x > 1:
		a[x - 2] += y - 1
	if x < n:
		a[x] += a[x - 1] - y
	a[x - 1] = 0
print('\n'.join(map(str, a)))


n = int(input())
arr = list(map(int, input().split()))
m = int(input())
for i in range(m):
	(a, b) = list(map(int, input().split()))
	a -= 1
	if a > 0:
		arr[a - 1] += b - 1
	if a < n - 1:
		arr[a + 1] += arr[a] - b
	arr[a] = 0
for i in range(n):
	print(arr[i])


wires = input()
w = []
w = input().split(' ')
birds_Wires = w[:int(wires)]
shots = input()
opration = []
for i in range(0, int(shots)):
	x_y = input().split(' ')
	opration.append(tuple(x_y))
for shot in opration:
	x = int(shot[0])
	y = int(shot[1])
	birds = int(birds_Wires[x - 1])
	birds_Wires[x - 1] = 0
	left = birds - (birds - y + 1)
	right = birds - y
	if x - 1 + 1 == len(birds_Wires):
		right = 0
	if x - 1 - 1 == -1:
		left = 0
	if x - 1 - 1 != -1:
		birds_Wires[x - 1 - 1] = int(birds_Wires[x - 1 - 1]) + left
	if x - 1 + 1 != len(birds_Wires):
		birds_Wires[x - 1 + 1] = int(birds_Wires[x - 1 + 1]) + right
for i in birds_Wires:
	print(i)


n = int(input())
al = list(map(int, input().split()))
d = int(input())
for i in range(d):
	(b, c) = map(int, input().split())
	if b != 1:
		al[b - 2] += c - 1
	if b != n:
		al[b] += al[b - 1] - c
	al[b - 1] = 0
for i in al:
	print(i)


n = int(input())
line = list(map(int, input().split()))
k = int(input())
for i in range(k):
	(x, y) = map(int, input().split())
	if x > 1:
		line[x - 2] += y - 1
	if x < n:
		line[x] += line[x - 1] - y
	line[x - 1] = 0
for i in range(n):
	print(line[i])


n = int(input())
a = [int(x) for x in input().split()]
m = int(input())
for i in range(m):
	temp = [int(x) for x in input().split()]
	x = temp[0]
	y = temp[1]
	if x - 1 != 0:
		a[x - 2] += y - 1
	if x - 1 != n - 1:
		a[x] += a[x - 1] - y
	a[x - 1] = 0
for x in a:
	print(x)


n = int(input())
a = list(map(int, input().split()))
m = int(input())
list1 = []
c = 0
for z in range(m):
	(x, y) = map(int, input().split())
	list1.append([x, y])
if len(a) == 1:
	if m == 0:
		print(*a)
	else:
		print(0)
if len(a) > 1:
	for i in range(m):
		if list1[i][0] == 1:
			a[1] += a[0] - list1[i][1]
			a[0] = 0
		elif list1[i][0] == n:
			a[-2] += list1[i][1] - 1
			a[-1] = 0
		else:
			a[list1[i][0] - 2] += list1[i][1] - 1
			a[list1[i][0]] += a[list1[i][0] - 1] - list1[i][1]
			a[list1[i][0] - 1] = 0
	for j in range(n):
		print(a[j])


n = int(input())
a = input().split()
for i in range(0, n):
	a[i] = int(a[i])
m = int(input())
birds_shot = []
for i in range(0, m):
	b = input().split()
	birds_shot.extend(b)
for i in range(0, 2 * m):
	birds_shot[i] = int(birds_shot[i])
for i in range(0, m):
	line_number = birds_shot[2 * i]
	bird_number = birds_shot[2 * i + 1]
	number_of_birds = a[line_number - 1]
	birds_left = bird_number - 1
	birds_right = number_of_birds - birds_left - 1
	if line_number - 1 >= 1:
		a[line_number - 2] += birds_left
	if line_number + 1 <= n:
		a[line_number] += birds_right
	a[line_number - 1] = 0
for i in range(0, n):
	print(a[i])


import itertools

def main():
	n = int(input())
	data = [int(v) for v in input().split()]
	m = int(input())
	for i in range(m):
		(a, b) = [int(v) for v in input().split()]
		pos = a - 1
		up = data[pos] - b
		down = b - 1
		data[pos] = 0
		if pos - 1 >= 0:
			data[pos - 1] += down
		if pos + 1 < n:
			data[pos + 1] += up
	for d in data:
		print(d)
main()


x = int(input())
k = [0] + list(map(int, input().split())) + [0]
y = int(input())
for i in range(y):
	(h1, h2) = map(int, input().split())
	k[h1 - 1] += h2 - 1
	k[h1 + 1] += k[h1] - h2
	k[h1] = 0
print('\n'.join(map(str, k[1:-1])))


n = int(input())
arr = list(map(int, input().split()))
arr = [0] + arr + [0]
m = int(input())
for i in range(m):
	(x, y) = map(int, input().split())
	arr[x - 1] += y - 1
	arr[x + 1] += arr[x] - y
	arr[x] = 0
for j in range(1, n + 1):
	print(arr[j])


n = int(input())
box = list(map(int, input().split()))
m = int(input())
(left, right) = (0, 0)
for i in range(0, m):
	p = list(map(int, input().split()))
	left = p[1] - 1
	right = box[p[0] - 1] - p[1]
	box[p[0] - 1] = 0
	if p[0] - 1 != n - 1:
		box[p[0]] = right + box[p[0]]
	if p[0] - 1 - 1 >= 0:
		box[p[0] - 1 - 1] = left + box[p[0] - 1 - 1]
for i in range(0, n):
	print(box[i])


n = int(input())
a = list(map(int, input().split()))
m = int(input())
for i in range(m):
	(x, y) = map(int, input().split())
	x -= 1
	y -= 1
	if x < n - 1:
		a[x + 1] += a[x] - y - 1
	if x > 0:
		a[x - 1] += y
	a[x] = 0
for i in range(n):
	print(a[i])


n = int(input())
wires = [*map(int, input().split(' '))]
m = int(input())
for i in range(m):
	value = [*map(int, input().split(' '))]
	if value[0] < n:
		wires[value[0]] += wires[value[0] - 1] - value[1]
	if value[0] >= 2:
		wires[value[0] - 2] += value[1] - 1
	wires[value[0] - 1] = 0
for i in wires:
	print(i)


n = int(input())
birds = list(map(int, input().split()))
shots = int(input())
if n == 1 and shots > 0:
	print(0)
else:
	for i in range(shots):
		(wire, pos) = map(int, input().split())
		if wire == 1:
			birds[wire] += birds[wire - 1] - pos
			birds[wire - 1] = 0
		elif wire == n:
			birds[wire - 2] += pos - 1
			birds[wire - 1] = 0
		else:
			birds[wire] += birds[wire - 1] - pos
			birds[wire - 2] += pos - 1
			birds[wire - 1] = 0
	for k in range(n):
		print(birds[k])


n = int(input())
bird_onthe_wire = [int(x) for x in input().split()]
m = int(input())
for i in range(m):
	(x, y) = map(int, input().split())
	jumpdown = bird_onthe_wire[x - 1] - y
	jumpup = y - 1
	if x == n:
		bird_onthe_wire[x - 2] += jumpup
	elif x == 1:
		bird_onthe_wire[x] += jumpdown
	else:
		bird_onthe_wire[x] += jumpdown
		bird_onthe_wire[x - 2] += jumpup
	bird_onthe_wire[x - 1] = 0
for i in bird_onthe_wire:
	print(i)


def main():
	n = int(input())
	a = [0] + list(map(int, input().split()))
	m = int(input())
	for i in range(1, m + 1, 1):
		(t1, t2) = map(int, input().split())
		if a[t1] >= t2:
			l = t2 - 1
			r = a[t1] - t2
			a[t1 - 1] += l
			if t1 + 1 <= n:
				a[t1 + 1] += r
			a[t1] = 0
	for i in range(1, n + 1, 1):
		print(a[i])
main()


n = int(input())
a = [0] + list(map(int, input().split())) + [0]
for i in range(int(input())):
	(x, y) = map(int, input().split())
	a[x - 1] = a[x - 1] + y - 1
	a[x + 1] = a[x + 1] + a[x] - y
	a[x] = 0
for i in range(1, len(a) - 1):
	print(a[i])


n = int(input())
wires = input().split()
m = int(input())
x = []
y = []
new_wires = []
for i in range(m):
	xy = input().split()
	x.append(int(xy[0]))
	y.append(int(xy[1]))
for i in range(m):
	wire = x[i]
	if wire in range(n):
		wires[wire] = int(wires[wire]) + int(wires[wire - 1]) - y[i]
	if wire - 2 >= 0:
		wires[wire - 2] = int(wires[wire - 2]) + y[i] - 1
	wires[wire - 1] = 0
for item in wires:
	print(item)


n = int(input())
list = [int(i) for i in input().split()]
m = int(input())
for i in range(m):
	(l, y) = map(int, input().split())
	if n == 1:
		print(0)
		exit()
	elif l == 1:
		list[l] += list[l - 1] - y
		list[l - 1] = 0
	elif l == n:
		list[l - 2] += y - 1
		list[l - 1] = 0
	else:
		list[l - 2] += y - 1
		list[l] += list[l - 1] - y
		list[l - 1] = 0
for i in range(n):
	print(list[i])


n_lines = int(input(' '))
birds = list(map(int, input(' ').split(' ')))
n_shoots = int(input(' '))
for x in range(n_shoots):
	(xi, yi) = map(int, input(' ').split(' '))
	t = yi - 1
	b = birds[xi - 1] - yi
	birds[xi - 1] = 0
	if xi - 2 >= 0:
		birds[xi - 2] = birds[xi - 2] + t
	if xi < len(birds):
		birds[xi] = birds[xi] + b
for i in range(len(birds)):
	print(birds[i])


n = int(input())
v = [int(i) for i in input().split()]
q = int(input())
for qq in range(q):
	(w, x) = map(int, input().split())
	w -= 1
	if w != 0:
		v[w - 1] += x - 1
	if w != n - 1:
		v[w + 1] += v[w] - x
	v[w] = 0
for i in range(n):
	print(v[i])


n = int(input())
s = input().split()
for i in range(n):
	s[i] = int(s[i])
m = int(input())
if n == 1:
	for i in range(m):
		x = input()
	if m == 0:
		print(s[0])
	else:
		print(0)
else:
	for i in range(m):
		(x, y) = map(int, input().split())
		x -= 1
		if x == 0:
			s[x] -= y
			s[x + 1] += s[x]
			s[x] = 0
		elif x == n - 1:
			s[x] -= s[x] - y + 1
			s[x - 1] += s[x]
			s[x] = 0
		else:
			s[x - 1] += y - 1
			s[x] -= y
			s[x + 1] += s[x]
			s[x] = 0
	for item in s:
		print(item)


n = int(input())
a = list(map(int, input().split()))
m = int(input())
w = [[0] * 2 for i in range(m)]
for i in range(m):
	(w[i][0], w[i][1]) = map(int, input().split())
for i in range(m):
	left = w[i][1] - 1
	right = a[w[i][0] - 1] - w[i][1]
	if w[i][0] != 1:
		a[w[i][0] - 2] += left
	if w[i][0] != n:
		a[w[i][0]] += right
	a[w[i][0] - 1] = 0
for i in range(n):
	print(a[i])


n = int(input())
arr = []
arr.append(0)
for x in input().split():
	arr.append(int(x))
arr.append(0)
m = int(input())
for i in range(m):
	(x, y) = map(int, input().split())
	arr[x - 1] += y - 1
	arr[x + 1] += arr[x] - y
	arr[x] = 0
for i in range(1, n + 1):
	print(arr[i])


wires = int(input())
BirdsNo = [int(x) for x in input().split()]
BirdsShot = int(input())
wire = []
bird = []
for i in range(0, BirdsShot):
	data = input().split()
	wire.append(int(data[0]))
	bird.append(int(data[1]))
for i in range(0, len(wire)):
	left = bird[i] - 1
	right = BirdsNo[wire[i] - 1] - bird[i]
	BirdsNo[wire[i] - 1] = 0
	if wire[i] - 1 == 0 and wire[i] + 1 > len(BirdsNo):
		BirdsNo[0] = 0
	elif wire[i] - 1 == 0:
		BirdsNo[wire[i]] = BirdsNo[wire[i]] + right
	elif wire[i] + 1 > len(BirdsNo):
		BirdsNo[wire[i] - 2] = BirdsNo[wire[i] - 2] + left
	else:
		BirdsNo[wire[i]] = BirdsNo[wire[i]] + right
		BirdsNo[wire[i] - 2] = BirdsNo[wire[i] - 2] + left
for i in BirdsNo:
	print(i)


i = lambda : [*map(int, input().split())]
n = i()[0]
a = [0] + i() + [0]
for _ in [0] * i()[0]:
	(x, y) = i()
	a[x - 1] += y - 1
	a[x + 1] += a[x] - y
	a[x] = 0
print(*a[1:n + 1], sep='\n')


num_wires = int(input())
num_birds_per_wire = list(map(int, input().split()))
num_shots = int(input())
shots_positions = [list(map(int, input().split())) for i in range(num_shots)]
for shot_pos in shots_positions:
	(x_pos, y_pos) = (shot_pos[0], shot_pos[1])
	(x_pos, y_pos) = (x_pos - 1, y_pos - 1)
	if x_pos > 0:
		num_birds_per_wire[x_pos - 1] += y_pos
	if x_pos < num_wires - 1:
		num_birds_per_wire[x_pos + 1] += num_birds_per_wire[x_pos] - y_pos - 1
	num_birds_per_wire[x_pos] = 0
for i in num_birds_per_wire:
	print(i)


n = int(input())
wires = [int(i) for i in input().split()]
m = int(input())
for i in range(0, m):
	(x, y) = map(int, input().split(' '))
	x = x - 1
	if x != 0:
		wires[x - 1] += y - 1
	if x != n - 1:
		wires[x + 1] += wires[x] - y
	wires[x] = 0
for j in range(0, n):
	print(wires[j])


a = int(input())
b = [0] + list(map(int, input().split())) + [0]
c = int(input())
for i in range(c):
	(d, e) = map(int, input().split())
	b[d + 1] += b[d] - e
	b[d] = 0
	b[d - 1] += e - 1
for i in range(a):
	print(b[i + 1])


NumberOfWires = int(input())
NumberOfBirds = input().split()
for i in range(0, len(NumberOfBirds)):
	NumberOfBirds[i] = int(NumberOfBirds[i])
Shots = int(input())
WireShot = []
BirdShot = []
for i in range(0, Shots):
	temp = input().split()
	WireShot.append(temp[0])
	BirdShot.append(temp[1])
for i in range(0, len(WireShot)):
	WireShot[i] = int(WireShot[i])
for i in range(0, len(BirdShot)):
	BirdShot[i] = int(BirdShot[i])
for i in range(Shots):
	temp = NumberOfBirds[WireShot[i] - 1]
	one = BirdShot[i] - 1
	two = temp - BirdShot[i]
	if two < 0:
		two = 0
	NumberOfBirds[WireShot[i] - 1] = 0
	try:
		if WireShot[i] - 2 >= 0:
			NumberOfBirds[WireShot[i] - 2] += one
	except:
		m = 0
	try:
		if WireShot[i] >= 0:
			NumberOfBirds[WireShot[i]] += two
	except:
		m = 0
for i in NumberOfBirds:
	print(i)


n = int(input())
b = [0] + list(map(int, input().split())) + [0]
m = int(input())
for _ in range(m):
	(w, s) = map(int, input().split())
	b[w + 1] += b[w] - s
	b[w] = 0
	b[w - 1] += s - 1
for i in range(n):
	print(b[i + 1])


n = int(input())
wires = [int(v) for v in input().split(' ')]
m = int(input())
for _ in range(m):
	(wire, bird) = [int(v) for v in input().split(' ')]
	cur_birds = wires[wire - 1]
	if wire - 2 >= 0:
		wires[wire - 2] += bird - 1
	if wire <= len(wires) - 1:
		wires[wire] += cur_birds - bird
	wires[wire - 1] = 0
for w in wires:
	print(w)


__copyright__ = ''
__author__ = 'Son-Huy TRAN'
__email__ = 'sonhuytran@gmail.com'
__doc__ = ''
__version__ = '1.0'

def main() -> int:
	n_wires = int(input())
	birds_in_wires = [0] + [int(word) for word in input().split()]
	n_shots = int(input())
	for i in range(n_shots):
		(x, y) = map(int, input().split())
		birds = birds_in_wires[x]
		left_birds = y - 1
		right_birds = birds - y
		birds_in_wires[x] = 0
		if x > 1:
			birds_in_wires[x - 1] += left_birds
		if x < n_wires:
			birds_in_wires[x + 1] += right_birds
	print('\n'.join([str(birds_in_wires[i]) for i in range(1, n_wires + 1)]))
	return 0
exit(main())


n = int(input())
l = list(map(int, input().split()))
q = int(input())
if q == 0:
	for i in range(n):
		print(l[i])
elif n == 1:
	print(0)
else:
	for i in range(q):
		(x, y) = map(int, input().split())
		x = x - 1
		if x == 0:
			l[x + 1] = l[x] - y + l[x + 1]
			l[x] = 0
		elif x == n - 1:
			l[x - 1] = y - 1 + l[x - 1]
			l[x] = 0
		else:
			l[x + 1] = l[x] + l[x + 1] - y
			l[x - 1] = y - 1 + l[x - 1]
			l[x] = 0
	for i in range(n):
		print(l[i])


n = int(input())
a = list(map(int, input().split()))
m = int(input())
for _ in range(m):
	s = input().split()
	(xi, yi) = (int(s[0]) - 1, int(s[1]) - 1)
	if xi - 1 >= 0:
		a[xi - 1] += yi
	if xi + 1 < n:
		a[xi + 1] += a[xi] - yi - 1
	a[xi] = 0
for ai in a:
	print(ai)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
import random
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def main():
	n = I()
	a = LI()
	m = I()
	q = [LI() for _ in range(m)]
	for (x, y) in q:
		x -= 1
		t = a[x]
		a[x] = 0
		if x > 0:
			a[x - 1] += y - 1
		if x < n - 1:
			a[x + 1] += t - y
	return '\n'.join(map(str, a))
print(main())


input()
wires = list(map(int, input().strip().split()))
times = int(input())
for i in range(times):
	fuckedup = list(map(int, input().strip().split()))
	wire = fuckedup[0]
	bird = fuckedup[1]
	if wire - 2 >= 0:
		wires[wire - 2] = wires[wire - 2] + (bird - 1)
	if wire < len(wires):
		wires[wire] = wires[wire] + (wires[wire - 1] - bird)
	wires[wire - 1] = 0
for i in wires:
	print(i)


def birds(a, shots):
	for shot in shots:
		if shot[0] - 1 > 0:
			a[shot[0] - 2] += shot[1] - 1
		if shot[0] < len(a):
			a[shot[0]] += a[shot[0] - 1] - shot[1]
		a[shot[0] - 1] = 0
	return a
n = int(input())
a = list(map(int, input().split()))
m = int(input())
shots = []
for _ in range(m):
	(x, y) = map(int, input().split())
	shots.append((x, y))
result = birds(a, shots)
for num in result:
	print(num)


n = int(input())
a = list(map(int, input().split()))
m = int(input())
l = []
for i in range(m):
	k = list(map(int, input().split()))
	l.append(k)
if n == 1 and m != 0:
	print(0)
else:
	for i in range(m):
		if l[i][0] - 1 == 0:
			a[l[i][0]] += a[l[i][0] - 1] - l[i][1]
			a[l[i][0] - 1] = 0
		elif l[i][0] - 1 == n - 1:
			a[l[i][0] - 2] += l[i][1] - 1
			a[l[i][0] - 1] = 0
		else:
			a[l[i][0]] += a[l[i][0] - 1] - l[i][1]
			a[l[i][0] - 2] += l[i][1] - 1
			a[l[i][0] - 1] = 0
	for i in range(len(a)):
		print(a[i])


n = int(input())
a = list(map(int, input().split()))
m = int(input())
kill = []
for i in range(m):
	kill.append(list(map(int, input().split())))
if n == 1 and m == 1:
	print(0)
elif m == 0:
	for i in range(n):
		print(a[i])
else:
	for i in range(m):
		index = kill[i][0] - 1
		killed = kill[i][1]
		if index == 0:
			a[index + 1] += a[index] - killed
			a[index] = 0
		elif index == n - 1:
			a[index - 1] += killed - 1
			a[index] = 0
		else:
			a[index - 1] += killed - 1
			a[index + 1] += a[index] - killed
			a[index] = 0
	for i in range(n):
		print(a[i])


n = int(input())
l = list(map(int, input().split()))
for i in range(int(input())):
	(line, pos) = list(map(int, input().split()))
	if line > 1:
		l[line - 2] += pos - 1
	if line < n:
		l[line] += l[line - 1] - pos
	l[line - 1] = 0
for i in l:
	print(i)


n = int(input())
lis = list((int(num) for num in input().strip().split()))[:n]
m = int(input())
for i in range(m):
	(x, y) = input().split()
	x = int(x) - 1
	y = int(y) - 1
	lis[x] -= 1
	if x > 0:
		lis[x - 1] += y
	if x < n - 1:
		lis[x + 1] += lis[x] - y
	lis[x] = 0
for i in range(n):
	print(lis[i])


n = int(input())
wires = [0]
for j in input().split():
	wires.append(int(j))
wires.append(0)
m = int(input())
for i in range(m):
	(x, y) = map(int, input().split())
	E = y - 1
	D = wires[x] - y
	wires[x] = 0
	wires[x - 1] += E
	wires[x + 1] += D
for i in range(1, n + 1):
	print(wires[i])


n = int(input())
l1 = list(map(int, input().strip().split()))
m = int(input())
for d in range(0, m):
	(x, y) = map(int, input().strip().split())
	if x - 1 - 1 > -1:
		l1[x - 1 - 1] += y - 1
	if x - 1 + 1 < n:
		l1[x - 1 + 1] += l1[x - 1] - y
	l1[x - 1] = 0
for i in l1:
	print(i)


def main():
	n = int(input())
	dis = dict()
	tmp = list()
	tmp = input()
	tmp = tmp.split()
	for i in range(n):
		tmp[i] = int(tmp[i])
		dis[i + 1] = tmp[i]
	tmp = []
	number = int(input())
	for i in range(number):
		tmp = input()
		tmp = tmp.split()
		box_num = int(tmp[0])
		bird_num = int(tmp[1])
		if box_num == 1:
			dis[1] = dis[1] - bird_num
			if n > 1:
				dis[2] += dis[1]
			dis[1] = 0
		elif box_num == len(dis):
			dis[box_num] = bird_num - 1
			dis[box_num - 1] += dis[box_num]
			dis[box_num] = 0
		else:
			dis[box_num - 1] += bird_num - 1
			dis[box_num + 1] += dis[box_num] - bird_num
			dis[box_num] = 0
	for i in range(1, n + 1):
		print(dis[i])
main()


n = int(input())
t = [int(j) for j in input().split()]
m = int(input())
i = 0
while i < m:
	d = [int(j) for j in input().split()]
	if d[0] < n:
		t[d[0]] += t[d[0] - 1] - d[1]
	if d[0] > 1:
		t[d[0] - 2] += d[1] - 1
	t[d[0] - 1] = 0
	i += 1
i = 0
while i < n:
	print(t[i])
	i += 1


n = int(input())
birds = list(map(int, input().split()))
kills = int(input())
cordinates = [[j for j in list(map(int, input().split()))] for i in range(kills)]
X = []
Y = []
for i in range(len(cordinates)):
	X.append(cordinates[i][0])
	Y.append(cordinates[i][1])
for i in range(len(X)):
	if n == 1:
		birds[0] = 0
	else:
		counter = X[i] - 1
		if counter == 0:
			birds[counter + 1] = birds[counter + 1] + abs(birds[counter] - Y[i])
			birds[counter] = 0
		elif counter == n - 1:
			birds[counter - 1] = birds[counter - 1] + abs(Y[i] - 1)
			birds[counter] = 0
		else:
			birds[counter - 1] = birds[counter - 1] + abs(Y[i] - 1)
			birds[counter + 1] = birds[counter + 1] + abs(birds[counter] - Y[i])
			birds[counter] = 0
for j in birds:
	print(j)


from fractions import Fraction
import sys

def i():
	return input()

def ii():
	return int(input())

def li():
	return input().split()

def mi():
	return list(map(int, input().split()))
n = ii()
a = mi()
m = ii()
for i in range(m):
	(x, y) = mi()
	x -= 1
	if x - 1 >= 0:
		a[x - 1] += y - 1
	if x + 1 < n:
		a[x + 1] += a[x] - y
	a[x] = 0
for i in a:
	print(i)


nb_wires = int(input())
population = [0] + [int(x) for x in input().split()] + [0]
nb_shots = int(input())
for _ in range(nb_shots):
	(wire_no, bird_no) = [int(x) for x in input().split()]
	population[wire_no - 1] += bird_no - 1
	population[wire_no + 1] += population[wire_no] - bird_no
	population[wire_no] = 0
for i in range(1, nb_wires + 1):
	print(population[i])


n = int(input())
li = list(map(int, input().split()))
li.insert(0, '')
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if x + 1 <= n:
		li[x + 1] += li[x] - y
	if x - 1 >= 1:
		li[x - 1] += y - 1
	li[x] = 0
for i in li:
	print(i)


number_wires = int(input())
number_birds_string = input().split()
number_birds = [int(number) for number in number_birds_string]
number_xy = []
number_shots = int(input())
for i in range(number_shots):
	number_xy_string = input().split()
	number_xy = [int(number) for number in number_xy_string]
	x = number_xy[0] - 1
	y = number_xy[1]
	if x >= 1:
		number_birds[x - 1] += y - 1
	if x <= number_wires - 2:
		number_birds[x + 1] += number_birds[x] - y
	number_birds[x] = 0
for i in range(number_wires):
	print(number_birds[i])


n = int(input())
v = [int(x) for x in input().split()]
m = int(input())
while m:
	(x, y) = map(int, input().split())
	x -= 1
	if x > 0:
		v[x - 1] += y - 1
	if x < n - 1:
		v[x + 1] += v[x] - y
	v[x] = 0
	m -= 1
for i in v:
	print(i)


birds = int(input())
total = list(map(int, input().split()))
shots = int(input())
if birds == 1 and shots == 1:
	print(0)
	return
if birds == 1 and shots == 0:
	print(total[0])
	return
for i in range(shots):
	(x, y) = tuple(map(int, input().split()))
	x = x - 1
	if x == 0:
		total[1] += total[0] - y
	elif x == len(total) - 1:
		total[x - 1] += y - 1
	else:
		total[x + 1] += total[x] - y
		total[x - 1] += y - 1
	total[x] = 0
for i in total:
	print(i)


n = int(input())
a = input().split()
a = [int(x) for x in a]
m = int(input())
b = []
for i in range(1, m + 1):
	lst = [int(x) for x in input().split()]
	b.append(lst)
for i in range(len(b)):
	b[i][0] -= 1
for i in range(m):
	if b[i][0] == 0 and (not n == 1):
		a[b[i][0] + 1] += a[b[i][0]] - b[i][1]
		a[b[i][0]] -= b[i][1] - 1 + a[b[i][0]] - b[i][1] + 1
	elif n == 1 and b[i][0] == 0:
		a[b[i][0]] -= b[i][1] - 1 + a[b[i][0]] - b[i][1] + 1
	elif b[i][0] == n - 1:
		a[b[i][0] - 1] += b[i][1] - 1
		a[b[i][0]] -= b[i][1] - 1 + a[b[i][0]] - b[i][1] + 1
	else:
		a[b[i][0] + 1] += a[b[i][0]] - b[i][1]
		a[b[i][0] - 1] += b[i][1] - 1
		a[b[i][0]] -= b[i][1] - 1 + a[b[i][0]] - b[i][1] + 1
for i in a:
	print(i)


N = int(input())
Wires = [int(x) for x in input().split()]
BirdsShot = int(input())
for i in range(BirdsShot):
	(Wire, Bird) = [int(x) for x in input().split()]
	Wire -= 1
	if N == 1:
		Wires[0] = 0
	elif Wire == 0:
		Wires[Wire + 1] += Wires[Wire] - Bird
		Wires[Wire] = 0
	elif Wire == len(Wires) - 1:
		Wires[Wire - 1] += Bird - 1
		Wires[Wire] = 0
	else:
		Wires[Wire - 1] += Bird - 1
		Wires[Wire + 1] += Wires[Wire] - Bird
		Wires[Wire] = 0
for i in Wires:
	print(i)


(n, g, m) = (int(input()), list(map(int, input().split())), int(input()))
for i in range(m):
	(x, y) = map(lambda x: int(x) - 1, input().split())
	if x != 0:
		g[x - 1] += y
	if x != n - 1:
		g[x + 1] += g[x] - y - 1
	g[x] = 0
for c in g:
	print(c)


n = int(input())
lst = list(map(int, input().split()))
m = int(input())
for i in range(m):
	temp = list(map(int, input().split()))
	row = temp[0] - 1
	if row > 0:
		lst[row - 1] += temp[1] - 1
	if row < n - 1:
		lst[row + 1] += lst[row] - temp[1]
	lst[row] = 0
for j in range(n):
	print(lst[j])


n = int(input())
l = [int(ele) for ele in input().split()]
m = int(input())
for _ in range(m):
	ls = [int(el) for el in input().split()]
	(x, y) = (ls[0] - 1, ls[1])
	if x == 0:
		l[0] = l[0] - y
		if n != 1:
			l[1] += l[0]
		l[0] = 0
	elif x == n - 1:
		l[n - 1] = y - 1
		l[n - 2] += l[n - 1]
		l[n - 1] = 0
	else:
		l[x - 1] += y - 1
		l[x + 1] += l[x] - y
		l[x] = 0
for e in l:
	print(e)


n = int(input())
wires = list(map(int, input().split()))
shots = int(input())
while shots > 0:
	(w, b) = map(int, input().split())
	w -= 1
	right = wires[w] - b
	left = wires[w] - right - 1
	wires[w] = 0
	if w - 1 > -1:
		wires[w - 1] += left
	if w + 1 < len(wires):
		wires[w + 1] += right
	shots -= 1
for i in wires:
	print(i)


n = int(input())
arr = [int(i) for i in input().split()]
m = int(input())
for i in range(m):
	(a, b) = map(int, input().split())
	if n == 1:
		print(0)
		exit()
	if a == 1:
		arr[1] = arr[1] + (arr[0] - b)
		arr[0] = 0
	elif a == n:
		arr[n - 2] = arr[n - 2] + (b - 1)
		arr[n - 1] = 0
	else:
		arr[a - 2] = arr[a - 2] + (b - 1)
		arr[a] = arr[a] + (arr[a - 1] - b)
		arr[a - 1] = 0
for i in arr:
	print(i)


n = int(input())
li = list(map(int, input().split()))
li.insert(0, 0)
m = int(input())
l = []
for i in range(m):
	(a, b) = map(int, input().split())
	k = li[a] - b
	li[a] = 0
	try:
		li[a - 1] += b - 1
	except:
		continue
	try:
		li[a + 1] += k
	except:
		continue
for i in li[1:]:
	print(i)


n_wires = int(input())
wires = list(map(int, input().split(' ')))
n_shoots = int(input())
shoots = []
for it in range(n_shoots):
	shoot = tuple(map(int, input().split(' ')))
	shoots.append(shoot)
for (idx, bird) in shoots:
	if idx != 1:
		wires[idx - 2] += bird - 1
	if idx != n_wires:
		wires[idx] += wires[idx - 1] - bird
	wires[idx - 1] = 0
for wire in wires:
	print(wire)


wires = list(map(int, input().split()))
birds_on_wires = list(map(int, input().split()))
no_of_shots = int(input())
o = []
for i in range(no_of_shots):
	o.append(list(map(int, input().split())))
for i in o:
	if i[0] - 1 == 0 and len(birds_on_wires) - 1 == 0:
		birds_on_wires[i[0] - 1] = 0
	elif i[0] - 1 == 0:
		birds_on_wires[i[0]] += birds_on_wires[i[0] - 1] - i[1]
	elif i[0] - 1 == len(birds_on_wires) - 1:
		birds_on_wires[i[0] - 2] += i[1] - 1
	else:
		birds_on_wires[i[0] - 2] += i[1] - 1
		birds_on_wires[i[0]] += birds_on_wires[i[0] - 1] - i[1]
	birds_on_wires[i[0] - 1] = 0
for i in birds_on_wires:
	print(i)


import sys
import math
import bisect
import itertools
import random

def main():
	n = int(input())
	A = list(map(int, input().split()))
	for _ in range(int(input())):
		(a, b) = map(int, input().split())
		a -= 1
		if a - 1 >= 0:
			A[a - 1] += b - 1
		if a + 1 < n:
			A[a + 1] += A[a] - b
		A[a] = 0
	print('\n'.join(list((str(a) for a in A))))
main()


w = int(input())
l = list(map(int, input().split()))
s = int(input())
for i in range(s):
	(x, y) = map(int, input().split())
	if w == 1:
		l[0] = 0
		break
	if x == 1:
		l[1] = l[1] + l[0] - y
		l[0] = 0
	elif x == w:
		l[w - 2] = l[w - 2] + y - 1
		l[w - 1] = 0
	else:
		l[x - 2] = l[x - 2] + y - 1
		l[x] = l[x] + l[x - 1] - y
		l[x - 1] = 0
print(*l, sep='\n')


def bird(birds, n, m):
	for i in range(m):
		inp = list(map(int, input().strip().split()))
		if inp[0] == 1 and inp[0] == n:
			birds[inp[0] - 1] = 0
		elif inp[0] == 1:
			birds[inp[0]] += birds[inp[0] - 1] - inp[1]
			birds[inp[0] - 1] = 0
		elif inp[0] == n:
			birds[inp[0] - 2] += inp[1] - 1
			birds[inp[0] - 1] = 0
		else:
			birds[inp[0]] += birds[inp[0] - 1] - inp[1]
			birds[inp[0] - 2] += inp[1] - 1
			birds[inp[0] - 1] = 0
	return birds
n = int(input())
birds = list(map(int, input().strip().split()))
m = int(input())
lists = bird(birds, n, m)
for elem in lists:
	print(elem)


n = int(input())
arr = [0] + list(map(int, input().split()))
numberOfFire = int(input())
for i in range(numberOfFire):
	(line, bird) = map(int, input().split())
	if line > 1:
		arr[line - 1] += bird - 1
	if line < n:
		arr[line + 1] += arr[line] - bird
	arr[line] = 0
print('\n'.join(map(str, arr[1:n + 1])))


lines = int(input())
values = [int(x) for x in input().split()]
for i in range(int(input())):
	(a, b) = map(int, input().split())
	if a == 1:
		if len(values) > 1:
			values[a] += values[0] - b
		values[0] = 0
	elif a == len(values):
		values[-2] += b - 1
		values[-1] = 0
	else:
		values[a - 2] += b - 1
		values[a] += values[a - 1] - b
		values[a - 1] = 0
for i in values:
	print(i)


n = int(input())
A = list(map(int, input().split()))
m = int(input())
shots = []
for _ in range(m):
	(X, Y) = input().split()
	(X, Y) = (int(X), int(Y))
	if X - 1 > 0 and X - 1 != n - 1:
		left = abs(Y - 1)
		right = abs(A[X - 1] - Y)
		(A[X - 2], A[X - 1], A[X]) = (A[X - 2] + left, 0, A[X] + right)
	elif X - 1 == 0:
		right = abs(A[X - 1] - Y)
		if n == 1:
			A[X - 1] = 0
		else:
			(A[X - 1], A[X]) = (0, A[X] + right)
	elif X - 1 == n - 1:
		left = abs(Y - 1)
		(A[X - 2], A[X - 1]) = (A[X - 2] + left, 0)
for j in range(n):
	print(A[j])


m = eval(input())
l = list(input().split(' '))
l = [int(i) for i in l]
N = eval(input())
for i in range(N):
	(x, y) = input().split(' ')
	(x, y) = (int(x) - 1, int(y))
	if x > 0:
		l[x - 1] += y - 1
	if x < m - 1:
		l[x + 1] += l[x] - y
	l[x] = 0
for i in l:
	print(i)


t = int(input())
arr = list(map(int, input().split()))
c = int(input())
for i in range(c):
	(a, b) = map(int, input().split())
	current = arr[a - 1]
	left = b - 1
	right = current - b
	if a != 1:
		arr[a - 2] = arr[a - 2] + left
	if a != len(arr):
		arr[a] = arr[a] + right
	arr[a - 1] = 0
for i in arr:
	print(i)


n = int(input())
x = [int(i) for i in input().split()]
m = int(input())
for i in range(m):
	y = [int(j) for j in input().split()]
	birdsleft = y[1] - 1
	birdsright = x[y[0] - 1] - birdsleft - 1
	if y[0] - 1 > 0:
		x[y[0] - 2] += birdsleft
	if y[0] + 1 <= n:
		x[y[0]] += birdsright
	x[y[0] - 1] = 0
for i in range(n):
	print(x[i])


input()
count = [*map(int, input().split())]
for i in range(int(input())):
	(idx, pos) = map(int, input().split())
	idx -= 1
	if idx - 1 >= 0:
		count[idx - 1] += pos - 1
	if idx + 1 < len(count):
		count[idx + 1] += count[idx] - pos
	count[idx] = 0
for x in count:
	print(x)


num_wires = int(input())
birds_on_wires = list(map(int, input().split()))
num_died_birds = int(input())
for i in range(0, num_died_birds):
	shot = list(map(int, input().split()))
	wire_num = shot[0] - 1
	died_num = shot[1]
	up_birds = died_num - 1
	down_birds = birds_on_wires[wire_num] - died_num
	if wire_num + 1 <= num_wires - 1:
		birds_on_wires[wire_num + 1] += down_birds
	if wire_num - 1 >= 0:
		birds_on_wires[wire_num - 1] += up_birds
	birds_on_wires[wire_num] = 0
for i in range(0, num_wires):
	print(birds_on_wires[i])


input()
Wires = list(map(int, input().split()))
N = int(input())
Shot = list()
for i in range(N):
	Shot.append(list(map(int, input().split())))
	Shot[i][0] -= 1
for i in range(len(Shot)):
	if Shot[i][0] != 0:
		Wires[Shot[i][0] - 1] += Shot[i][1] - 1
	if Shot[i][0] != len(Wires) - 1:
		Wires[Shot[i][0] + 1] += Wires[Shot[i][0]] - Shot[i][1]
	Wires[Shot[i][0]] = 0
print(*Wires, sep='\n')


n = int(input())
a = list(map(int, input().split()))
m = int(input())
if n >= 2:
	for _ in range(m):
		(x, y) = map(int, input().split())
		if x == 1:
			a[1] = a[1] + (a[0] - y)
			a[0] = 0
		elif x == n:
			a[n - 2] = a[n - 2] + y - 1
			a[n - 1] = 0
		else:
			a[x - 2] = a[x - 2] + y - 1
			a[x] = a[x] + (a[x - 1] - y)
			a[x - 1] = 0
	for i in a:
		print(i, end='\n')
elif m != 0:
	input()
	print(0)
else:
	print(*a)


n = int(input())
lst = [int(i) for i in input().split()]
m = int(input())
a = list()
for i in range(m):
	a1 = [int(j) for j in input().split()]
	if a1[0] < n:
		lst[a1[0]] = lst[a1[0]] + lst[a1[0] - 1] - a1[1]
	if a1[0] > 1:
		lst[a1[0] - 2] = lst[a1[0] - 2] + a1[1] - 1
	lst[a1[0] - 1] = 0
for elem in lst:
	print(elem)


n = int(input())
a = [int(i) for i in input().split()]
m = int(input())
xy = []
for i in range(m):
	xy.append([int(i) for i in input().split()])
for j in xy:
	if j[0] - 2 >= 0:
		a[j[0] - 2] += j[1] - 1
	if j[0] < n:
		a[j[0]] += a[j[0] - 1] - j[1]
	a[j[0] - 1] = 0
for k in a:
	print(k)


n = int(input())
l = [int(x) for x in input().split()]
m = int(input())
for i in range(m):
	(a, b) = [int(x) for x in input().split()]
	if a != 1:
		l[a - 2] += b - 1
	if a != n:
		l[a] += l[a - 1] - b
	l[a - 1] = 0
for i in l:
	print(i)


n = int(input())
ar = [int(x) for x in input().split()]
ar.insert(0, 0)
ar.append(0)
m = int(input())
for i in range(0, m):
	(x, y) = map(int, input().split())
	ar[x - 1] += y - 1
	ar[x + 1] += ar[x] - y
	ar[x] = 0
for i in ar[1:n + 1]:
	print(i)


n = int(input())
arr = [None] + list(map(int, input().split()))
t = int(input())
for i in range(t):
	temp = list(map(int, input().split()))
	try:
		arr[temp[0] + 1] += arr[temp[0]] - temp[1]
	except:
		pass
	finally:
		arr[temp[0]] -= arr[temp[0]] - temp[1]
	try:
		arr[temp[0] - 1] += arr[temp[0]] - 1
	except:
		pass
	finally:
		arr[temp[0]] = 0
for i in range(1, len(arr)):
	print(arr[i])


n = input()
a = input()
aa = []
aa += map(int, a.split())
m = int(input())
xy = []
z = []
for j in range(m):
	z += [input()]
for j in range(m):
	(hu, ha) = map(int, z[j].split())
	xy += (hu, ha)
for i in range(m):
	i += 1
	if xy[2 * i - 2] - 1 != 0:
		aa[xy[2 * i - 2] - 2] += xy[2 * i - 1] - 1
	if xy[2 * i - 2] - 1 != int(n) - 1:
		aa[xy[2 * i - 2]] += aa[xy[2 * i - 2] - 1] - xy[2 * i - 1]
	aa[xy[2 * i - 2] - 1] = 0
for i in aa:
	print(i)


n = int(input())
string = input()
birds = list(map(int, string.split()))
s = int(input())
for x in range(s):
	string = input()
	numbers = string.split()
	(a, b) = (int(numbers[0]), int(numbers[1]))
	if a > 1:
		birds[a - 2] += b - 1
	if a < n:
		birds[a] += birds[a - 1] - b
	birds[a - 1] = 0
for x in birds:
	print(x)


n = int(input())
l = list(map(int, input().split()))
m = int(input())
p = []
for i in range(m):
	w = list(map(int, input().split()))
	p.append(w)
for i in range(m):
	r = p[i][0]
	t = l[r - 1] - p[i][1]
	if r < n:
		l[r] = l[r] + t
	l[r - 1] = 0
	if r - 2 >= 0:
		l[r - 2] = l[r - 2] + p[i][1] - 1
for i in range(len(l)):
	print(l[i])


input()
birds = input().split(' ')
birds = [int(item) for item in birds]
times = int(input())
for x in range(times):
	shot = input().split(' ')
	wire = int(shot[0])
	bird = int(shot[1])
	if len(birds) == 1:
		birds[0] = 0
	elif wire == 1:
		birds[wire] += birds[wire - 1] - bird
	elif wire == len(birds):
		birds[wire - 2] += bird - 1
	else:
		birds[wire] += birds[wire - 1] - bird
		birds[wire - 2] += bird - 1
	birds[wire - 1] = 0
for y in birds:
	print(y)


n = int(input())
l = list(map(int, input().split()))
l.insert(0, 0)
m = int(input())
for i in range(1, m + 1):
	(p, q) = map(int, input().split())
	if p == 1 and p == n:
		l[p] = 0
	elif p == 1:
		l[p + 1] += l[p] - q
		l[p] = 0
	elif p == n:
		l[p - 1] += q - 1
		l[p] = 0
	else:
		l[p - 1] += q - 1
		l[p + 1] += l[p] - q
		l[p] = 0
l.pop(0)
for i in l:
	print(i)


noofboxes = int(input())
leneachbox = list(map(int, input().split()))
noofmoves = int(input())
for i in range(noofmoves):
	(x, y) = map(int, input().split())
	x -= 1
	if x != 0:
		leneachbox[x - 1] += y - 1
	if x != noofboxes - 1:
		leneachbox[x + 1] += leneachbox[x] - y
	leneachbox[x] = 0
for i in leneachbox:
	print(i)


n = int(input())
a = list(map(int, input().split()))
m = int(input())
x = []
y = []
for c in range(m):
	info = list(map(int, input().split()))
	x.append(info[0])
	y.append(info[1])
for i in range(m):
	a1 = a[x[i] - 1] - y[i]
	a2 = a[x[i] - 1] - 1 - a1
	a[x[i] - 1] = 0
	if x[i] - 2 >= 0 and x[i] <= len(a) - 1:
		a[x[i] - 2] = a[x[i] - 2] + a2
		a[x[i]] = a[x[i]] + a1
	elif x[i] - 2 < 0 and x[i] <= len(a) - 1:
		a[x[i]] = a[x[i]] + a1
	elif x[i] > len(a) - 1 and x[i] - 2 >= 0:
		a[x[i] - 2] = a[x[i] - 2] + a2
for elem in a:
	print(elem)


n = int(input())
wire = list(map(int, input().split()))
shots = []
for i in range(int(input())):
	(w, b) = map(int, input().split())
	if w == 1 and n == 1:
		wire[w - 1] = 0
	elif w == 1:
		wire[w] += wire[w - 1] - b
	elif w == n:
		wire[w - 2] += b - 1
	else:
		wire[w - 2] += b - 1
		wire[w] += wire[w - 1] - b
	wire[w - 1] = 0
print('\n'.join(map(str, wire)))


n = int(input())
a = list(map(int, input().split()))
m = int(input())
x = []
y = []
for _ in range(m):
	(tmp1, tmp2) = map(int, input().split())
	x.append(tmp1)
	y.append(tmp2)
for i in range(m):
	left = y[i] - 1
	right = a[x[i] - 1] - y[i]
	a[x[i] - 1] = 0
	if x[i] - 2 >= 0:
		a[x[i] - 2] += left
	if x[i] <= n - 1:
		a[x[i]] += right
for i in a:
	print(i)


class my_list(list):

	def __setitem__(self, index, value):
		if index < 0 or index >= len(self):
			return
		return list.__setitem__(self, index, value)

	def __getitem__(self, index):
		if index < 0 or index >= len(self):
			return 0
		return list.__getitem__(self, index)
(n, branches) = (int(input()), my_list(map(int, input().split())))
m = int(input())
for i in range(m):
	(x, y) = map(int, input().split())
	branches[x - 2] += y - 1
	branches[x] += branches[x - 1] - y
	branches[x - 1] = 0
for i in branches:
	print(i)


x = int(input())
a = []
b = list(map(int, input().split()))
for i in b:
	a.append([1] * i)
n = int(input())
while n:
	(x0, y0) = map(int, input().split())
	x0 -= 1
	y0 -= 1
	lol = len(a[x0][:y0])
	olo = len(a[x0][y0 + 1:])
	a[x0] = []
	if x0 - 1 >= 0:
		a[x0 - 1].extend([1] * lol)
	if x0 + 1 < x:
		a[x0 + 1].extend([1] * olo)
	n -= 1
for i in a:
	print(len(i))


def INT():
	return int(input())

def lis():
	return [int(x) for x in input().split()]
n = INT()
a = lis()
m = INT()
for i in range(m):
	(x, y) = lis()
	if x == 1:
		if n != 1:
			a[x] += a[x - 1] - y
		a[x - 1] = 0
	elif x == n:
		if n != 1:
			a[x - 2] += y - 1
		a[x - 1] = 0
	else:
		a[x - 2] += y - 1
		a[x] += a[x - 1] - y
		a[x - 1] = 0
for i in range(n):
	print(a[i])


from sys import stdin

def main():
	inp = stdin
	wires = int(inp.readline())
	Lwires = list(map(int, inp.readline().split()))
	nums = int(inp.readline())
	electro = dict()
	for i in range(0, wires):
		electro[str(i)] = Lwires[i]
	for i in range(0, nums):
		(x, y) = map(int, inp.readline().split())
		x = x - 1
		temp = electro[str(x)] - 1
		left = y - 1
		right = temp - left
		(prox, ante) = (x + 1, x - 1)
		electro[str(x)] = 0
		if prox < wires and prox >= 0:
			electro[str(prox)] = electro[str(prox)] + right
		if ante >= 0 and ante < wires:
			electro[str(ante)] = electro[str(ante)] + left
	for i in range(0, wires):
		print(str(electro[str(i)]))
main()


from sys import stdin, stdout
from math import gcd, sqrt, floor, ceil
input = stdin.readline

def list_inp(x):
	return list(map(x, input().split()))

def map_inp(x):
	return map(x, input().split())

def lcm(a, b):
	return a * b / gcd(a, b)
n = int(input())
arr = list_inp(int)
arr = [0] + arr + [0]
t = int(input())
for _ in range(t):
	(a, b) = map_inp(int)
	arr[a - 1] += b - 1
	arr[a + 1] += arr[a] - b
	arr[a] = 0
for i in range(1, n + 1):
	print(arr[i])


def solve(n, a, m, pairs):
	for (x, y) in pairs:
		x -= 1
		if x > 0:
			a[x - 1] += y - 1
		if x < n - 1:
			a[x + 1] += a[x] - y
		a[x] = 0
	for i in a:
		print(i)

def main():
	n = int(input())
	a = list(map(int, input().split()))
	m = int(input())
	pairs = [map(int, input().split()) for _ in range(m)]
	solve(n, a, m, pairs)
main()


n = int(input())
l = list(map(int, input().split()))
m = int(input())
for i in range(m):
	(x, y) = map(int, input().split())
	t = l[x - 1] - y
	l[x - 1] = 0
	if x - 2 >= 0:
		l[x - 2] += y - 1
	if x != n:
		l[x] += t
print(*l, sep='\n')


n = int(input())
a = [int(i) for i in input().split()]
m = int(input())
for i in range(m):
	(x, y) = input().split()
	right = a[int(x) - 1] - int(y)
	left = int(y) - 1
	a[int(x) - 1] -= right + left + 1
	try:
		a[int(x) - 1 + 1] += right
	except:
		pass
	try:
		if int(x) - 1 - 1 >= 0:
			a[int(x) - 1 - 1] += left
	except:
		pass
for b in a:
	print(b)


n = int(input())
w = [int(i) for i in input().split()]
m = int(input())
for i in range(m):
	s = [int(i) for i in input().split()]
	wi = s[0] - 1
	ol = s[1]
	if wi - 1 >= 0:
		w[wi - 1] += ol - 1
	if wi + 1 < n:
		w[wi + 1] += w[wi] - ol
	w[wi] = 0
for i in w:
	print(i)


import sys
n = int(input())
number_of_birds_first = {}
number_of_birds = list(map(int, input().split()))
for i in range(1, n + 1):
	number_of_birds_first[i] = number_of_birds[i - 1]
no_of_shots = int(input())
for i in range(no_of_shots):
	shoot_info = list(map(int, input().split()))
	line_number = shoot_info[0]
	bird_position = shoot_info[1]
	if n == 1:
		print(0)
		sys.exit()
	if line_number > 1 and line_number < n:
		number_of_birds_first[line_number - 1] += bird_position - 1
		number_of_birds_first[line_number + 1] += number_of_birds_first[line_number] - bird_position
		number_of_birds_first[line_number] = 0
	elif line_number == 1:
		number_of_birds_first[line_number + 1] += number_of_birds_first[line_number] - bird_position
		number_of_birds_first[line_number] = 0
	elif line_number == n:
		number_of_birds_first[line_number - 1] += bird_position - 1
		number_of_birds_first[line_number] = 0
for i in range(1, n + 1):
	print(number_of_birds_first[i])


num = int(input())
n = list(map(int, input().split()))
num1 = int(input())
if num1 != 0:
	if len(n) != 1:
		for i in range(num1):
			s = list(map(int, input().split()))
			h = s[0] - 1
			up = abs(n[h] - s[1])
			down = s[1] - 1
			if h == 0:
				n[1] += up
			elif h == len(n) - 1:
				n[-2] += down
			else:
				n[h + 1] += up
				n[h - 1] += down
			n[h] = 0
		for j in n:
			print(j)
	else:
		print(0)
else:
	for i in n:
		print(i)


n = int(input())
l = list(map(int, input().split()))
m = int(input())
if n > 1:
	for i in range(m):
		(x, y) = map(int, input().split())
		dl = l[x - 1] - y
		du = y - 1
		l[x - 1] = 0
		if x == 1:
			l[x] += dl
		elif x == n:
			l[x - 2] += du
		else:
			l[x - 2] += du
			l[x] += dl
	for i in l:
		print(i)
else:
	for i in range(m):
		(x, y) = map(int, input().split())
	if m > 0:
		print(0)
	else:
		print(l[0])


input()
a = [int(i) for i in input().split()]
a = [0] + a + [0]
b = int(input())
while b > 0:
	c = [int(i) for i in input().split()]
	a[c[0] - 1] += c[1] - 1
	a[c[0] + 1] += a[c[0]] - c[1]
	a[c[0]] = 0
	b -= 1
for i in range(len(a) - 2):
	print(a[i + 1])


n = int(input())
a = list(map(int, input().split()))
m = int(input())
for i in range(m):
	(x, y) = map(int, input().split())
	if x - 1 == 0 and x == n:
		a[x - 1] = 0
	elif x == n:
		left_birds = y - 1
		a[x - 1] = 0
		a[x - 2] = a[x - 2] + left_birds
	elif x - 1 == 0:
		right_birds = a[x - 1] - y
		a[x - 1] = 0
		a[x] = a[x] + right_birds
	else:
		right_birds = a[x - 1] - y
		left_birds = y - 1
		a[x - 1] = 0
		a[x] += right_birds
		a[x - 2] += left_birds
for i in range(n):
	print(a[i])


n = int(input())
a = list(map(int, input().split()))
m = int(input())
for q in range(0, m):
	temp = input().split()
	x = int(temp[0]) - 1
	y = int(temp[1])
	try:
		a[x + 1] = a[x + 1] + a[x] - y
	except:
		pass
	if x - 1 < 0:
		pass
	else:
		a[x - 1] = a[x - 1] + y - 1
	a[x] = 0
for x in a:
	print(x)


n = int(input())
birdsOnWires = [int(n) for n in input().split(' ')]
totalBirdsKilled = int(input())
for i in range(totalBirdsKilled):
	(wire, birdShot) = input().split()
	(wire, birdShot) = (int(wire), int(birdShot))
	if n != 1:
		if wire == 1:
			birdsOnWires[wire] += birdsOnWires[wire - 1] - birdShot
		elif wire == len(birdsOnWires):
			birdsOnWires[wire - 2] += birdShot - 1
		else:
			birdsOnWires[wire - 2] += birdShot - 1
			birdsOnWires[wire] += birdsOnWires[wire - 1] - birdShot
	birdsOnWires[wire - 1] = 0
for w in birdsOnWires:
	print(w)


n = int(input())
a = input().split()
a = list(map(int, a))
m = int(input())
shot = []
wire_order = []
for i in range(m):
	inputting = input().split()
	wire_order += inputting[0].split()
	shot += inputting[1].split()
shot = list(map(int, shot))
wire_order = list(map(int, wire_order))
for i in range(m):
	if wire_order[i] < len(a):
		a[wire_order[i]] += a[wire_order[i] - 1] - shot[i]
	if wire_order[i] - 2 >= 0:
		a[wire_order[i] - 2] += shot[i] - 1
	a[wire_order[i] - 1] = 0
for i in a:
	print(i)


wires = int(input())
birds_in_wires = list(map(int, input().split()))
no_of_shots = int(input())
for _ in range(no_of_shots):
	(wire, bird) = map(int, input().split())
	wire -= 1
	temp = birds_in_wires[wire]
	birds_in_wires[wire] = 0
	right_birds = temp - bird
	left_birds = bird - 1
	left_pos = 0
	if wire > 0:
		left_pos = wire - 1
	if wire < wires - 1:
		right_pos = wire + 1
	else:
		right_pos = wire
	if wire <= 0:
		birds_in_wires[left_pos] = 0
	else:
		birds_in_wires[left_pos] += left_birds
	if wire >= wires - 1:
		birds_in_wires[right_pos] = 0
	else:
		birds_in_wires[right_pos] += right_birds
for i in birds_in_wires:
	print(i)


def birder(l1, l2, i):
	wire = l2[i][0] - 1
	bird = l2[i][1]
	if wire == 0:
		if len(l1) == 1:
			l1[0] = 0
		else:
			l1[1] += l1[0] - bird
			l1[0] = 0
	elif wire == len(l1) - 1:
		l1[-2] += bird - 1
		l1[-1] = 0
	else:
		l1[wire + 1] += l1[wire] - bird
		l1[wire - 1] += bird - 1
		l1[wire] = 0
	return l1

def solution(l1, n2, b):
	i = 0
	while i < n2:
		l1 = birder(l1, b, i)
		i += 1
	i = 0
	c_out = ''
	while i < len(l1):
		print(l1[i])
		i += 1

def answer():
	n = int(input())
	l1 = [int(x) for x in input().split()]
	n2 = int(input())
	b = []
	s = n2
	while n2:
		b.append([int(x) for x in input().split()])
		n2 -= 1
	n2 = s
	solution(l1, n2, b)
answer()


n = int(input())
w = [0] + input().split() + [0]
w = list(map(int, w))
m = int(input())
for i in range(1, m + 1):
	(x, y) = input().split()
	x = int(x)
	y = int(y)
	temp = w[x]
	w[x] = 0
	w[x - 1] += y - 1
	w[x + 1] += temp - y
for i in range(1, len(w) - 1):
	print(w[i])


import math, itertools, fractions, heapq, collections, bisect, sys, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	_n = I()
	ans = []
	l = LI()
	n = I()
	for _ in range(n):
		(a, b) = LI()
		if a != 1:
			l[a - 2] += b - 1
		if a != _n:
			l[a] += l[a - 1] - b
		l[a - 1] = 0
	for x in l:
		print(x)
main()


from sys import stdin, stdout, stderr, setrecursionlimit
setrecursionlimit(100000)

def debug(*e):
	if not __debug__:
		print(*e, file=stderr)

def dd(*vals):
	import inspect, re
	frame = inspect.getframeinfo(inspect.stack()[1][0])
	vs = re.search('dd\\((.+)\\)', frame.code_context[0]).group(1).split(',')
	if vs:
		debug(','.join(('{0} = {1}'.format(vs[i], v) for (i, v) in enumerate(vals))))

def trace(f):

	def traced(*args, **kw):
		debug('calling {} with args {}, {}'.format(f.__name__, args, kw))
		return f(*args, **kw)
	return traced

def read():
	return stdin.readline().rstrip()

def readarr(sep=None, maxsplit=-1):
	return read().split(sep, maxsplit)

def readint():
	return int(read())

def readia(sep=None, maxsplit=-1):
	return [int(a) for a in readarr(sep, maxsplit)]

def write(*args, **kwargs):
	sep = kwargs.get('sep', ' ')
	end = kwargs.get('end', '\n')
	stdout.write(sep.join((str(a) for a in args)) + end)

def writea(arr, sep=' ', end='\n'):
	stdout.write(sep.join((str(a) for a in arr)) + end)
n = readint()
xs = readia()
m = readint()
for _ in range(m):
	(x, y) = [i - 1 for i in readia()]
	if x - 1 >= 0:
		xs[x - 1] += y
	if x + 1 < n:
		xs[x + 1] += xs[x] - (y + 1)
	xs[x] = 0
writea(xs, sep='\n')


n = int(input())
a = [int(i) for i in input().split()]
m = int(input())
if n == 1 and m == 1:
	print(0)
elif n == 1 and m == 0:
	print(a[0])
else:
	for i in range(m):
		(x, y) = map(int, input().split())
		x -= 1
		if x == 0:
			a[x + 1] += a[x] - y
		elif x == n - 1:
			a[x - 1] += y - 1
		else:
			a[x + 1] += a[x] - y
			a[x - 1] += y - 1
		a[x] = 0
	for i in a:
		print(i)


I = lambda : list(map(int, input().split()))
n = I()[0]
a = [0] + I() + [0]
for _ in '0' * I()[0]:
	(x, y) = I()
	a[x - 1] += y - 1
	a[x + 1] += a[x] - y
	a[x] = 0
for i in range(n):
	print(a[i + 1])


n = int(input())
a = list(map(int, input().split()))
z = int(input())
for i in range(z):
	(x, y) = map(int, input().split())
	if x == 1 and x == n:
		a[x - 1] = 0
	elif x == 1:
		a[x] = a[x] + a[x - 1] - y
		a[x - 1] = 0
	elif x == n:
		a[x - 2] = a[x - 2] + y - 1
		a[x - 1] = 0
	else:
		a[x] = a[x] + a[x - 1] - y
		a[x - 2] = a[x - 2] + y - 1
		a[x - 1] = 0
for i in a:
	print(i)


wires = int(input())
birds_per_wire = list(map(int, input().rstrip().split()))
shooting_trials = int(input())
for i in range(0, shooting_trials):
	trial = list(map(int, input().rstrip().split()))
	wire_index = trial[0] - 1
	if wire_index > 0:
		birds_per_wire[wire_index - 1] = trial[1] - 1 + birds_per_wire[wire_index - 1]
	if wire_index + 1 < len(birds_per_wire):
		birds_per_wire[wire_index + 1] = birds_per_wire[wire_index] - trial[1] + birds_per_wire[wire_index + 1]
	birds_per_wire[wire_index] = 0
for j in birds_per_wire:
	print(j)


from operator import itemgetter
n = int(input())
ai = list(map(int, input().split()))
m = int(input())
for i in range(m):
	(x, y) = map(int, input().split())
	x -= 1
	if x > 0:
		ai[x - 1] += y - 1
	if x < n - 1:
		ai[x + 1] += ai[x] - y
	ai[x] = 0
for i in range(n):
	print(ai[i])


n = int(input())
l = [int(i) for i in input().split()]
m = int(input())
c = [[int(i) for i in input().split()] for i in range(m)]
for i in c:
	x = i[0] - 1
	y = i[1]
	if x - 1 >= 0 and x + 1 < n:
		l[x - 1] += y - 1
		l[x + 1] += l[x] - y
		l[x] = 0
	elif x - 1 < 0 and x + 1 < n:
		l[x + 1] += l[x] - y
		l[x] = 0
	elif x - 1 >= 0 and x + 1 >= n:
		l[x - 1] += y - 1
		l[x] = 0
	else:
		l[x] = 0
for i in l:
	print(i)


n = int(input())
birds = list(map(int, input().split()))
shoot = int(input())
mat = []
for i in range(shoot):
	x = list(map(int, input().split()))
	mat.append(x)
for i in range(shoot):
	index = mat[i][0] - 1
	if index != 0:
		birds[index - 1] = birds[index - 1] + mat[i][1] - 1
	if index != n - 1:
		birds[index + 1] = birds[index + 1] + abs(mat[i][1] - birds[index])
	birds[index] = 0
for j in range(len(birds)):
	print(birds[j])


n = int(input())
inp = input().split()
arr = []
for i in range(len(inp)):
	arr.append(int(inp[i]))
t = int(input())
l = []
for i in range(t):
	inp1 = input().split()
	l.append(inp1)
for i in range(t):
	x = int(l[i][0]) - 1
	y = int(l[i][1]) - 1
	if x == 0:
		if len(arr) != 1:
			arr[1] = arr[1] + (arr[x] - y - 1)
		arr[0] = 0
	elif x == len(arr) - 1:
		arr[x - 1] = arr[x - 1] + y
		arr[x] = 0
	else:
		arr[x - 1] = arr[x - 1] + y
		arr[x + 1] = arr[x + 1] + (arr[x] - y - 1)
		arr[x] = 0
for i in range(len(arr)):
	print(arr[i])


import sys

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def rinput():
	return map(int, sys.stdin.readline().strip().split())

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))
n = iinput()
a = list(map(int, input().split()))
m = iinput()
for i in range(m):
	(x, y) = rinput()
	left = y - 1
	right = a[x - 1] - y
	if x >= 2:
		a[x - 2] += left
	if x < n:
		a[x] += right
	a[x - 1] = 0
for i in range(n):
	print(a[i])


n = int(input())
l1 = list(map(int, input().split()))
n2 = int(input())
l = []
for i in range(n2):
	l2 = list(map(int, input().split()))
	l.append(l2)
for i in l:
	if i[0] == n:
		l1[n - 2] += i[1] - 1
		l1[n - 1] = 0
	elif i[0] == 1:
		l1[1] += l1[0] - i[1]
		l1[0] = 0
	else:
		l1[i[0]] += l1[i[0] - 1] - i[1]
		l1[i[0] - 2] += i[1] - 1
		l1[i[0] - 1] = 0
for i in l1:
	print(i)


a = int(input())
l = list(map(int, input().split()))
b = int(input())
for i in range(b):
	(a1, a2) = map(int, input().split())
	a1 -= 1
	a2 -= 1
	if len(l) == 1:
		l[a1] -= l[a1] - a1
		l[a1] -= a1
	elif a1 == 0:
		l[a1 + 1] += l[a1] - (a2 + 1)
		l[a1] = 0
	elif a1 == a - 1:
		l[a1 - 1] += a2
		l[a1] = 0
	else:
		l[a1 + 1] += l[a1] - (a2 + 1)
		l[a1 - 1] += a2
		l[a1] = 0
for i in l:
	print(i)


(n, a) = (int(input()), list(map(int, input().split())))
for i in range(int(input())):
	(x, y) = map(int, input().split())
	a[x - 2] += y - 1 if x - 1 != 0 else 0
	if x != n:
		a[x] += a[x - 1] - y
	a[x - 1] = 0
print(*a, sep='\n')


import sys
n = input()
q = list((int(n) for n in input().split()))
m = input()
for i in range(0, int(m)):
	(a, b) = input().split()
	o = int(a)
	k = int(b)
	if int(o) != 1:
		q[o - 2] = q[o - 2] + (k - 1)
	if int(o) != int(n):
		q[o] = q[o] + (q[o - 1] - k)
	q[o - 1] = 0
for j in range(0, int(n)):
	print(q[j])


from itertools import product
from math import ceil
from fractions import Fraction

def binary_table(string_with_all_characters, length_to_make):
	return [''.join(x) for x in product(string_with_all_characters, repeat=length_to_make)]

def all_possible_substrings(string):
	return [int(string[i:j]) for i in range(len(string)) for j in range(i + 1, len(string) + 1)]

def number_of_substrings(length):
	return int(length * (length + 1) / 2)

def is_prime(num):
	for i in range(2, num):
		if num / i == int(num / i) and num != i:
			return False
	return True
num_of_lines = int(input())
birds_and_lines = list(map(int, input().split()))
num_of_shots = int(input())
for i in range(num_of_shots):
	(x, y) = map(int, input().split())
	line_num = x - 1
	num_of_birds = birds_and_lines[line_num]
	birds_to_left = y - 1
	birds_to_right = num_of_birds - y
	birds_and_lines[line_num] -= 1
	if x + 1 > len(birds_and_lines):
		birds_and_lines[line_num] -= birds_to_right
	else:
		birds_and_lines[line_num + 1] += birds_to_right
		birds_and_lines[line_num] -= birds_to_right
	if x - 1 == 0:
		birds_and_lines[line_num] -= birds_to_left
	else:
		birds_and_lines[line_num - 1] += birds_to_left
		birds_and_lines[line_num] -= birds_to_left
for i in birds_and_lines:
	print(i)


m = int(input())
arr = list(map(int, input().split()))
case = int(input())
while case != 0:
	(i, k) = map(int, input().split())
	if i == 1 and len(arr) > 1:
		arr[i] += arr[i - 1] - k
	elif i == m:
		arr[i - 2] += k - 1
	else:
		arr[i - 2] += k - 1
		arr[i] += arr[i - 1] - k
	case -= 1
	arr[i - 1] = 0
for i in arr:
	print(i, end='\n')


n = int(input())
a = list(map(int, input().split()))
m = int(input())
for _ in range(m):
	(x, y) = map(int, input().split())
	if x - 2 >= 0:
		a[x - 2] += y - 1
	if x < n:
		a[x] += a[x - 1] - y
	a[x - 1] = 0
for e in a:
	print(e)


empt = input()
pos = list(map(int, input().split()))
shots = int(input())
for _ in range(shots):
	(a, b) = list(map(int, input().split()))
	a -= 1
	b -= 1
	if a < len(pos) - 1:
		pos[a + 1] += pos[a] - b - 1
	if a > 0:
		pos[a - 1] += b
	pos[a] = 0
for i in pos:
	print(i)


n = int(input())
lis = [int(x) for x in input().split()]
m = int(input())
for i in range(m):
	t = input().split()
	t[0] = int(t[0]) - 1
	t[1] = int(t[1])
	if t[0] - 1 >= 0:
		lis[t[0] - 1] += t[1] - 1
	if t[0] + 1 < n:
		lis[t[0] + 1] += lis[t[0]] - t[1]
	lis[t[0]] = 0
print(*lis, sep='\n')


import operator as op
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from functools import reduce
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, gcd, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
	return int(input())

def inlist():
	return list(map(int, input().split()))

def instr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())

def def_value():
	return 0
n = inp()
a = [0]
a += inlist()
m = inp()
for _ in range(m):
	(x, y) = invr()
	if x - 1 > 0:
		a[x - 1] += y - 1
	if x + 1 <= n:
		a[x + 1] += a[x] - y
	a[x] = 0
for i in range(1, n + 1):
	print(a[i])


x = int(input())
y = list(map(int, input().split()))
aa = []
bb = []
for i in range(int(input())):
	(a, b) = list(map(int, input().split()))
	aa.append(a)
	bb.append(b)
for (i, o) in zip(aa, bb):
	if i - 2 < 0:
		if x == 1:
			y[i - 1] = 0
		else:
			y[i] += abs(y[i - 1] - o)
			y[i - 1] = 0
	elif i == x:
		y[i - 2] += o - 1
		y[i - 1] = 0
	else:
		y[i - 2] += o - 1
		y[i] += abs(y[i - 1] - o)
		y[i - 1] = 0
for i in y:
	print(i)


n = int(input())
myList = list(map(int, input().split()))
m = int(input())
for i in range(m):
	(x, y) = map(int, input().split())
	a = y - 1
	b = myList[x - 1] - y
	myList[x - 1] = 0
	if x - 2 >= 0:
		myList[x - 2] += a
	if x < n:
		myList[x] += b
for ans in myList:
	print(ans)


n = int(input())
a = list(map(int, input().split()))
m = int(input())
for i in range(m):
	(x, y) = map(int, input().split())
	if n == 1:
		a[0] = 0
	else:
		x = x - 1
		if x == 0:
			t1 = y - 1
			t2 = a[x] - y
			a[x + 1] += t2
			a[x] = 0
		elif x == n - 1:
			t1 = y - 1
			t2 = a[x] - y
			a[x - 1] += t1
			a[x] = 0
		else:
			t1 = y - 1
			t2 = a[x] - y
			a[x - 1] += t1
			a[x + 1] += t2
			a[x] = 0
for i in a:
	print(i)


n = int(input())
a = input().split()
a = [int(i) for i in a]
s = int(input())
for i in range(s):
	rgt = 0
	lft = 0
	(x, y) = input().split()
	(x, y) = (int(x), int(y))
	x -= 1
	rgt = a[x] - y
	lft = a[x] - (rgt + 1)
	a[x] = 0
	try:
		a[x + 1] += rgt
	except IndexError:
		a[x] += 0
	if x - 1 < 0:
		a[x] += 0
	else:
		a[x - 1] += lft
for i in range(n):
	print(a[i])


n = int(input())
v = [0]
p = [int(i) for i in input().split()]
for i in range(n):
	v.append(p[i])
m = int(input())
for i in range(m):
	(x, y) = map(int, input().split())
	if x == n or y == v[x]:
		v[x - 1] += y - 1
		v[x] = 0
	elif x == 1 or y == 1:
		v[x + 1] += v[x] - y
		v[x] = 0
	else:
		v[x + 1] += v[x] - y
		v[x - 1] += y - 1
		v[x] = 0
for i in range(1, n + 1):
	print(v[i])


n = int(input())
a = [int(s) for s in input().split(' ')]
m = int(input())
for shot in range(m):
	(x, y) = [int(s) for s in input().split(' ')]
	if x > 1:
		a[x - 2] += y - 1
	if x < n:
		a[x] += a[x - 1] - y
	a[x - 1] = 0
for wire in a:
	print(wire)


n = int(input())
a = list(map(int, input().split()))
m = int(input())
for i in range(m):
	(x, y) = map(int, input().split())
	x = x - 1
	if n == 1:
		a[0] = 0
		break
	if x == 0:
		a[x + 1] += a[x] - y
		a[x] = 0
	elif x == n - 1:
		a[x - 1] += y - 1
		a[x] = 0
	else:
		a[x - 1] += y - 1
		a[x + 1] += a[x] - y
		a[x] = 0
print(*a, sep='\n')


inputs = lambda : list(map(int, input().split()))
(num_wires,) = inputs()
num_birds_per_wire = inputs()
num_shots = int(input())
for i in range(num_shots):
	(x, y) = inputs()
	(x, y) = (x - 1, y - 1)
	if x > 0:
		num_birds_per_wire[x - 1] += y
	if x < num_wires - 1:
		num_birds_per_wire[x + 1] += num_birds_per_wire[x] - y - 1
	num_birds_per_wire[x] = 0
print('\n'.join(map(str, num_birds_per_wire)))


x = int(input())
a = list(map(int, input().split()))
q = int(input())
s = []
h = []
m = 0
t = 0
for p in range(q):
	k = list(map(int, input().split()))
	s.append(k)
if x == 1:
	if q == 1:
		print('0')
	else:
		print(a[0])
else:
	for t in range(q):
		r = s[t][0]
		d = s[t][1]
		h.append(r)
		s[t] = d
	for i in h:
		i = i - 1
		if i == 0:
			a[i + 1] = a[i + 1] + (a[i] - s[m])
			a[i] = 0
			m += 1
		elif i == x - 1:
			a[i - 1] = a[i - 1] + (a[i] - (a[i] - s[m])) - 1
			a[i] = 0
			m += 1
		else:
			a[i + 1] = a[i + 1] + (a[i] - s[m])
			a[i - 1] = a[i - 1] + (a[i] - (a[i] - s[m])) - 1
			a[i] = 0
			m += 1
	for j in a:
		print(j)


a = int(input())
b = input().split()
c = int(input())
l = []
for i in range(c):
	d = input().split()
	l.append(d)
p = []
for i in range(a):
	w = int(b[i])
	p.append(w)
for i in range(c):
	samne = int(l[i][1]) - 1
	pos = int(l[i][0]) - 1
	pichone = p[pos] - samne - 1
	if pos - 1 < 0:
		p[pos] = p[pos] - samne
	else:
		p[pos] = p[pos] - samne
		p[pos - 1] = p[pos - 1] + samne
	if pos + 1 >= a:
		p[pos] = p[pos] - pichone
	else:
		p[pos] = p[pos] - pichone
		p[pos + 1] = p[pos + 1] + pichone
	p[pos] = p[pos] - 1
for i in range(a):
	print(p[i])


n = int(input())
a = [int(a) for a in input().split()]
m = int(input())
for i in range(m):
	(k, j) = input().split()
	x = int(k)
	y = int(j)
	c = x - 1
	l = a[c]
	left = y - 1
	right = l - y
	a[c] = 0
	if c >= 1:
		a[c - 1] += left
	if c < n - 1:
		a[c + 1] += right
for bird in a:
	print(bird)


n = int(input())
a = list(map(int, input().split()))
m = int(input())
for x in range(m):
	(x, y) = map(int, input().split())
	if n != 1:
		if x - 2 < 0:
			a[x] += a[x - 1] - y
			a[x - 1] = 0
		elif x == n:
			a[x - 2] += y - 1
			a[x - 1] = 0
		else:
			a[x - 2] += y - 1
			a[x] += a[x - 1] - y
			a[x - 1] = 0
	elif m > 0:
		a[0] = 0
for ele in a:
	print(ele)


n = int(input())
l = [int(x) for x in input().split()]
m = int(input())
for i in range(m):
	(x, y) = map(int, input().split())
	if x != n:
		l[x] += l[x - 1] - y
	if x != 1:
		l[x - 2] += y - 1
	l[x - 1] = 0
for c in l:
	print(c)


n = int(input())
l = list(map(int, input().split()))
m = int(input())
for i in range(m):
	(p, q) = map(int, input().split())
	if n == 1:
		l[p - 1] = 0
		continue
	if p == 1:
		l[p] += l[p - 1] - q
	elif p == n:
		l[p - 2] += q - 1
	else:
		l[p] += l[p - 1] - q
		l[p - 2] += q - 1
	l[p - 1] = 0
for i in l:
	print(i)


import os
import sys
import math
from io import BytesIO, IOBase
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def dijkstra(start, distance, path, n):
	visited = [False for _ in range(n)]
	distance[start] = 0
	for i in range(n):
		v = -1
		for j in range(n):
			if not visited[v] and (v == -1 or distance[j] < distance[v]):
				v = j
		if distance[v] == math.inf:
			break
		visited[v] = True
		for edge in adj[v]:
			destination = edge[0]
			weight = edge[1]
			if distance[v] + weight < distance[destination]:
				distance[destination] = distance[v] + weight
				path[destination] = v

def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)

def lcm(a, b):
	return a * b // gcd(a, b)

def ncr(n, r):
	return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def npr(n, r):
	return math.factorial(n) // math.factorial(n - r)

def seive(n):
	primes = [True] * (n + 1)
	ans = []
	for i in range(2, n):
		if not primes[i]:
			continue
		j = 2 * i
		while j <= n:
			primes[j] = False
			j += i
	for p in range(2, n + 1):
		if primes[p]:
			ans += [p]
	return ans

def factors(n):
	factors = []
	x = 1
	while x * x <= n:
		if n % x == 0:
			if n // x == x:
				factors.append(x)
			else:
				factors.append(x)
				factors.append(n // x)
		x += 1
	return factors

def main():
	try:
		n = inp()
		a = inlt()
		m = inp()
		for i in range(m):
			(x, y) = invr()
			x -= 1
			if 0 <= x - 1 < n:
				a[x - 1] += y - 1
			if 0 <= x + 1 < n:
				a[x + 1] += a[x] - y
			a[x] = 0
		print(*a, sep='\n')
	except Exception as e:
		print(e)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import sys
import math
n = int(sys.stdin.readline())
an = [int(x) for x in sys.stdin.readline().split()]
m = int(sys.stdin.readline())
for i in range(m):
	(x, y) = [int(x) for x in sys.stdin.readline().split()]
	x -= 1
	if x - 1 >= 0:
		an[x - 1] += y - 1
	if x + 1 < n:
		an[x + 1] += an[x] - y
	an[x] = 0
for i in an:
	print(i)


n = int(input())
a = [int(x) for x in input().split()]
m = int(input())
for _ in range(m):
	(x, y) = [int(x) for x in input().split()]
	x -= 1
	if x > 0:
		a[x - 1] += y - 1
	if x < n - 1:
		a[x + 1] += a[x] - y
	a[x] = 0
for x in a:
	print(x)


n = int(input())
lt = list(input().split())
D = {-1: 0, n: 0}
for i in range(n):
	lt[i] = int(lt[i])
	D[i] = lt[i]
m = int(input())
while m != 0:
	m -= 1
	k = list(input().split())
	(a, b) = (int(k[0]), int(k[1]))
	D[a - 2] += b - 1
	D[a] += D[a - 1] - b
	D[a - 1] = 0
for i in range(n):
	print(D[i])


n = int(input())
lst = list(map(int, input().split()))
m = int(input())
for i in range(m):
	(x, y) = map(int, input().split())
	x -= 1
	a = lst[x] - y
	b = y - 1
	if x == n - 1:
		lst[x - 1] += b
	elif x == 0:
		lst[x + 1] += a
	else:
		lst[x + 1] += a
		lst[x - 1] += b
	lst[x] = 0
for l in lst:
	print(l)


def solve(t_id):
	n = int(input())
	a = list(map(int, input().split()))
	m = int(input())
	for i in range(m):
		(x, y) = map(int, input().split())
		x -= 1
		if x > 0:
			a[x - 1] += y - 1
		if x < n - 1:
			a[x + 1] += a[x] - y
		a[x] = 0
	print(*a, sep='\n')
t = 1
for t_id in range(1, t + 1):
	solve(t_id)
	t -= 1


wn = int(input())
li = list(map(int, input().split(' ')))
n = int(input())
op = list()
i = 0
while i < n:
	op.append(list(map(int, input().split(' '))))
	i = i + 1
i = 0
while i < n:
	wire = li[op[i][0] - 1]
	lb = abs(op[i][1] - 1)
	rb = abs(wire - op[i][1])
	li[op[i][0] - 1] = 0
	if op[i][0] - 2 >= 0:
		li[op[i][0] - 2] = li[op[i][0] - 2] + lb
	if op[i][0] < wn:
		li[op[i][0]] = li[op[i][0]] + rb
	i = i + 1
i = 0
while i < wn:
	print(li[i])
	i = i + 1


n = int(input())
z = list(map(int, input().split()))
m = int(input())
if m == 0:
	for i in z:
		print(i)
elif n == 1:
	a = input()
	print(0)
else:
	for _ in range(m):
		(wire, bird) = map(int, input().split())
		if wire == 1:
			z[wire] += z[wire - 1] - bird
			z[wire - 1] = 0
		elif wire == n:
			z[wire - 2] += bird - 1
			z[wire - 1] = 0
		else:
			z[wire] += z[wire - 1] - bird
			z[wire - 2] += bird - 1
			z[wire - 1] = 0
	for i in z:
		print(i)


n = int(input())
boxes = list(map(int, input().split()))
m = int(input())
positions = []
for row in range(m):
	positions.append([])
	positions[row] = list(map(int, input().split()))
for i in range(m):
	if n == 1:
		boxes[positions[i][0] - 1] = 0
	elif n == 2:
		if positions[i][0] == 1:
			boxes[positions[i][0]] += boxes[positions[i][0] - 1] - positions[i][1]
			boxes[positions[i][0] - 1] = 0
		elif positions[i][0] == n:
			boxes[positions[i][0] - 1 - 1] += positions[i][1] - 1
			boxes[positions[i][0] - 1] = 0
	elif positions[i][0] == 1:
		boxes[positions[i][0]] += boxes[positions[i][0] - 1] - positions[i][1]
		boxes[positions[i][0] - 1] = 0
	elif positions[i][0] == n:
		boxes[positions[i][0] - 1 - 1] += positions[i][1] - 1
		boxes[positions[i][0] - 1] = 0
	else:
		boxes[positions[i][0] - 1 - 1] += positions[i][1] - 1
		boxes[positions[i][0]] += boxes[positions[i][0] - 1] - positions[i][1]
		boxes[positions[i][0] - 1] = 0
for i in range(n):
	print(boxes[i])


_ = input()
lst = list(map(int, input().split()))
n = int(input())
for i in range(n):
	(x, y) = map(int, input().split())
	x -= 1
	if x != 0 and x != len(lst) - 1:
		lst[x - 1] += y - 1
		lst[x + 1] += lst[x] - y
		lst[x] = 0
	elif len(lst) == 1:
		lst[x] = 0
	elif x == 0:
		lst[x + 1] += lst[x] - y
		lst[x] = 0
	else:
		lst[x - 1] += y - 1
		lst[x] = 0
for i in lst:
	print(i)


n = int(input())
b = input().split()
for i in range(n):
	b[i] = int(b[i])
m = int(input())
for i in range(m):
	(x, y) = input().split()
	x = int(x)
	y = int(y)
	if x - 2 >= 0:
		b[x - 2] += y - 1
	if x < n:
		b[x] += b[x - 1] - y
	b[x - 1] = 0
for i in range(n):
	print(b[i])


n = int(input())
a = list(map(int, input().split()))
for i in range(int(input())):
	(index, pos) = list(map(int, input().split()))
	index = index - 1
	if index - 1 >= 0:
		a[index - 1] += pos - 1
	if index + 1 < n:
		a[index + 1] += a[index] - pos
	a[index] = 0
print(*a, sep='\n')


(n, A) = (int(input()), list(map(int, input().split())))
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if x > 1:
		A[x - 2] += y - 1
	if x < n:
		A[x] += A[x - 1] - y
	A[x - 1] = 0
print(*A, sep='\n')


numberOfWires = int(input())
birdsOnWire = list(map(int, input().split()))
numberOfShots = int(input())
shots = []
for _ in range(numberOfShots):
	shots.append(list(map(int, input().split())))
for shot in range(numberOfShots):
	shotedWire = shots[shot][0]
	shotedWire -= 1
	shotedBird = shots[shot][1]
	birdsOnShotedWire = birdsOnWire[shotedWire - 1]
	if shotedWire != 0:
		birdsOnWire[shotedWire - 1] += shotedBird - 1
	if shotedWire != numberOfWires - 1:
		birdsOnWire[shotedWire + 1] += birdsOnWire[shotedWire] - shotedBird
	birdsOnWire[shotedWire] = 0
for birds in birdsOnWire:
	print(birds)


def birds(n, arr):
	q = int(input())
	for i in range(q):
		(x, y) = map(int, input().split())
		if n == 1:
			arr[0] = 0
		elif x == n:
			arr[x - 2] += y - 1
		elif x == 1:
			arr[x] += arr[0] - y
		else:
			arr[x - 2] += y - 1
			arr[x] += arr[x - 1] - y
		arr[x - 1] = 0
	for i in range(n):
		print(arr[i])
	return
n = int(input())
arr = [int(arr) for arr in input().split()]
birds(n, arr)


n = int(input())
s = [int(i) for i in input().split()]
m = int(input())
d = []
for i in range(m):
	(x, y) = map(int, input().split())
	if x - 2 >= 0:
		s[x - 2] += y - 1
	if x < n:
		s[x] += s[x - 1] - y
	s[x - 1] = 0
for i in s:
	print(i)


n = int(input())
a = [0]
a.extend(map(int, input().split()))
a.append(0)
m = int(input())
for _ in range(m):
	(x, y) = map(int, input().split())
	a[x - 1] += y - 1
	a[x + 1] += a[x] - y
	a[x] = 0
print(*a[1:-1], sep='\n')


n = int(input())
arr = list(map(int, input().split()))
m = int(input())
matrix = []
for i in range(m):
	a = list(map(int, input().split()))
	matrix.append(a)
for i in range(m):
	x = matrix[i][0]
	y = matrix[i][1]
	if x - 1 >= 1:
		arr[x - 2] += y - 1
	if x + 1 <= n:
		arr[x] += arr[x - 1] - y
	arr[x - 1] = 0
for i in range(n):
	print(arr[i])


n = int(input())
a = list(map(int, input().split()))
k = int(input())
for i in range(k):
	(p, q) = list(map(int, input().split()))
	if p == 1 and len(a) > 1:
		a[p] = a[p - 1] - q + a[p]
		a[p - 1] = 0
	elif p == 1 and len(a) == 1:
		a[p - 1] = 0
	elif p == len(a):
		a[p - 2] = a[p - 2] + q - 1
		a[p - 1] = 0
	else:
		a[p] = a[p - 1] - q + a[p]
		a[p - 2] = a[p - 2] + q - 1
		a[p - 1] = 0
for j in range(n):
	print(a[j])


n = int(input())
birdsList = list(map(int, input().split()))
numOfShots = int(input())
shots = []
for i in range(numOfShots):
	shots.append(list(map(int, input().split())))
for i in range(numOfShots):
	x = shots[i][0]
	x -= 1
	y = shots[i][1]
	if n == 1:
		birdsList[0] = 0
		break
	if x == 0:
		birdsList[x + 1] += birdsList[x] - y
	elif x == n - 1:
		birdsList[x - 1] += y - 1
	else:
		birdsList[x + 1] += birdsList[x] - y
		birdsList[x - 1] += y - 1
	birdsList[x] = 0
for wire in birdsList:
	print(wire)


input()
l = [-2] + list(map(int, input().split()))
n = int(input())
for _ in range(n):
	tmp = list(map(int, input().split()))
	if tmp[0] - 1 > 0:
		l[tmp[0] - 1] += tmp[1] - 1
	if tmp[0] + 1 < len(l):
		l[tmp[0] + 1] += l[tmp[0]] - tmp[1]
	l[tmp[0]] = 0
for i in range(1, len(l)):
	print(l[i])


T_ON = 0
DEBUG_ON = 1
MOD = 998244353

def solve():
	n = read_int()
	A = read_ints()
	m = read_int()
	for i in range(m):
		(x, y) = read_ints()
		x -= 1
		if x > 0:
			A[x - 1] += y - 1
		if x < n - 1:
			A[x + 1] += A[x] - y
		A[x] = 0
	for a in A:
		print(a)

def main():
	T = read_int() if T_ON else 1
	for i in range(T):
		solve()

def debug(*xargs):
	if DEBUG_ON:
		print(*xargs)
from collections import *
import math
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def read_int():
	return int(input())

def read_ints():
	return list(map(int, input().split()))

def print_nums(nums):
	print(' '.join(map(str, nums)))

def YES():
	print('YES')

def Yes():
	print('Yes')

def NO():
	print('NO')

def No():
	print('No')

def First():
	print('First')

def Second():
	print('Second')

def fib(n):
	(a, b) = (0, 1)
	for _ in range(n):
		(a, b) = (b, a + b)
	return a

def fib_ns(n):
	assert n >= 1
	f = [0 for _ in range(n + 1)]
	f[0] = 0
	f[1] = 1
	for i in range(2, n + 1):
		f[i] = f[i - 1] + f[i - 2]
	return f

def fib_to_n(n):
	f = []
	(a, b) = (0, 1)
	while a <= n:
		f.append(a)
		(a, b) = (b, a + b)
	return f

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def xgcd(a, b):
	(x0, x1, y0, y1) = (0, 1, 1, 0)
	while a != 0:
		((q, a), b) = (divmod(b, a), a)
		(y0, y1) = (y1, y0 - q * y1)
		(x0, x1) = (x1, x0 - q * x1)
	return (b, x0, y0)

def lcm(a, b):
	d = gcd(a, b)
	return a * b // d

def is_even(x):
	return x % 2 == 0

def is_odd(x):
	return x % 2 == 1

def modinv(a, m):
	(g, x, _) = xgcd(a, m)
	if g != 1:
		raise Exception('gcd(a, m) != 1')
	return x % m

def mod_add(x, y):
	x += y
	while x >= MOD:
		x -= MOD
	while x < 0:
		x += MOD
	return x

def mod_mul(x, y):
	return x * y % MOD

def mod_pow(x, y):
	if y == 0:
		return 1
	if y % 2:
		return mod_mul(x, mod_pow(x, y - 1))
	p = mod_pow(x, y // 2)
	return mod_mul(p, p)

def mod_inv(y):
	return mod_pow(y, MOD - 2)

def mod_div(x, y):
	return mod_mul(x, mod_inv(y))

def is_prime(n):
	if n == 1:
		return False
	for i in range(2, int(n ** 0.5) + 1):
		if n % i:
			return False
	return True

def gen_primes(n):
	P = [True for _ in range(n + 1)]
	P[0] = P[1] = False
	for i in range(int(n ** 0.5) + 1):
		if P[i]:
			for j in range(2 * i, n + 1, i):
				P[j] = False
	return P
main()


n = int(input())
in_list = [int(x) for x in input().split()]
query = int(input())
for q in range(query):
	(line, pos) = map(int, input().split())
	if line - 2 >= 0:
		in_list[line - 2] += pos - 1
	if line < n:
		in_list[line] = in_list[line] + in_list[line - 1] - pos
	in_list[line - 1] = 0
for birds in in_list:
	print(birds)


n = int(input())
alist = input().strip().split(' ')
alist = [int(a) for a in alist]
m = int(input())
for i in range(m):
	xy = input().strip().split()
	x = int(xy[0]) - 1
	y = int(xy[1])
	if x != 0:
		alist[x - 1] += y - 1
	if x != n - 1:
		alist[x + 1] += alist[x] - y
	alist[x] = 0
for i in range(n):
	print(alist[i])


input()
a = list(map(int, input().split()))
size = int(input())
for i in range(size):
	(x, y) = list(map(int, input().split()))
	if x - 1 > 0:
		a[x - 2] += y - 1
	if x < len(a):
		a[x] += a[x - 1] - y
	a[x - 1] = 0
for i in a:
	print(i)


n = int(input())
b = input().split()
k = int(input())
for i in range(k):
	(x, y) = map(int, input().split())
	x -= 1
	if x != 0:
		b[x - 1] = int(b[x - 1]) + (y - 1)
	if x != n - 1:
		b[x + 1] = int(b[x + 1]) + (int(b[x]) - y)
	b[x] = 0
for i in range(n):
	print(b[i])


def main():
	number_of_wires = int(input())
	birds = list(map(int, input().split()))
	birds_in_each_wire = {i: birds[i - 1] for i in range(1, number_of_wires + 1)}
	shots = [tuple(map(int, input().split())) for i in range(int(input()))]

	def oskols(birds_in_each_wire, shots):
		for shot in shots:
			(wire, died_bird) = shot
			nbirds = birds_in_each_wire[wire]
			birds_in_each_wire[wire] = 0
			if wire + 1 in birds_in_each_wire:
				birds_in_each_wire[wire + 1] += nbirds - died_bird
			if wire - 1 in birds_in_each_wire:
				birds_in_each_wire[wire - 1] += nbirds - (nbirds - died_bird + 1)
		return birds_in_each_wire
	the_left_oskols = oskols(birds_in_each_wire, shots)
	for bird in the_left_oskols.values():
		print(bird)
main()


n = int(input())
arr = list(map(int, input().split()))
shots = int(input())
for shot in range(shots):
	(wire, y) = map(int, input().split())
	current_birds = arr[wire - 1]
	if wire - 2 >= 0:
		arr[wire - 2] += y - 1
	if wire < len(arr):
		arr[wire] += current_birds - y
	arr[wire - 1] = 0
for i in arr:
	print(i)


def bird_counter(number_of_rows, m, rows):
	for i in range(0, m):
		(x, y) = map(int, input().split())
		line = x - 1
		if line > 0 and line < len(rows) - 1:
			upper_line = x - 2
			lower_line = x
			rows[upper_line] = rows[upper_line] + y - 1
			rows[lower_line] = rows[lower_line] + rows[line] - y
			rows[line] = 0
		elif line == 0:
			if number_of_rows == 1:
				rows[line] = 0
			else:
				lower_line = x
				rows[lower_line] = rows[lower_line] + rows[line] - y
				rows[line] = 0
		elif line == len(rows) - 1:
			upper_line = x - 2
			rows[upper_line] = rows[upper_line] + y - 1
			rows[line] = 0
	for birds in rows:
		print(birds)
number_of_row = int(input())
rows = list(map(int, input().split()))
m = int(input())
bird_counter(number_of_row, m, rows)


from sys import stdin
_ = stdin.readline()
w = list(map(int, stdin.readline().split()))
for _ in range(int(stdin.readline())):
	(i, o) = list(map(int, stdin.readline().split()))
	i -= 1
	if i != 0:
		w[i - 1] += o - 1
	if i != len(w) - 1:
		w[i + 1] += w[i] - o
	w[i] = 0
for i in range(len(w)):
	print(w[i])


n = int(input())
a = [int(x) for x in input().split()]
m = int(input())
for i in range(m):
	b = [int(x) for x in input().split()]
	s1 = int(b[1] - 1)
	s2 = int(a[b[0] - 1] - b[1])
	if n == 1:
		a[0] = 0
	elif b[0] == 1:
		a[1] = a[1] + s2
		a[0] = 0
	elif b[0] == n:
		a[n - 2] = a[n - 2] + s1
		a[n - 1] = 0
	else:
		a[b[0] - 2] = a[b[0] - 2] + s1
		a[b[0]] = a[b[0]] + s2
		a[b[0] - 1] = 0
for i in range(n):
	print(a[i])


m = int(input())
birds = list(map(int, input().split()))
n = int(input())
for _ in range(n):
	(x, y) = map(int, input().split())
	x -= 1
	if x > 0:
		birds[x - 1] += y - 1
	if x < m - 1:
		birds[x + 1] += birds[x] - y
	birds[x] = 0
for value in birds:
	print(value)


n = int(input())
l = list(map(int, input().split()))
l.insert(0, 0)
l.append(0)
for i in range(int(input())):
	(x, y) = map(int, input().split())
	l[x - 1] += y - 1
	l[x + 1] += l[x] - y
	l[x] = 0
print('\n'.join(map(str, l[1:-1])))


n = int(input())
w_n = [int(x) for x in input().split()]
m = int(input())
x_y = []
for i in range(m):
	l = [int(x) for x in input().split()]
	x_y.append(l)
for i in x_y:
	if i[0] == 1:
		if i[0] == n:
			w_n[i[0] - 1] = 0
			continue
		w_n[i[0]] += w_n[i[0] - 1] - i[1]
		w_n[i[0] - 1] = 0
	elif i[0] == n:
		w_n[i[0] - 2] += i[1] - 1
		w_n[i[0] - 1] = 0
	else:
		w_n[i[0] - 2] += i[1] - 1
		w_n[i[0]] += w_n[i[0] - 1] - i[1]
		w_n[i[0] - 1] = 0
for i in w_n:
	print(i)


n = int(input())
ls = list(map(int, input().split()))
ls.insert(0, 0)
m = int(input())
for i in range(m):
	(x, y) = input().split()
	x = int(x)
	y = int(y)
	if x == n and x == 1:
		ls[x] = 0
	elif x == 1:
		ls[x + 1] += ls[x] - y
	elif x == n:
		ls[x - 1] += y - 1
	else:
		ls[x - 1] += y - 1
		ls[x + 1] += ls[x] - y
	ls[x] = 0
for i in range(1, n + 1):
	print(ls[i])


n = int(input())
array = [int(i) for i in input().split()]
for _ in range(int(input())):
	(x, y) = [int(i) for i in input().split()]
	x -= 1
	if x == 0 and x == len(array) - 1:
		array[x] = 0
	elif x == 0:
		array[x + 1] += array[x] - y
		array[x] = 0
	elif x == len(array) - 1:
		array[x - 1] += y - 1
		array[x] = 0
	else:
		array[x + 1] += array[x] - y
		array[x - 1] += y - 1
		array[x] = 0
for i in array:
	print(i)


n = int(input())
a = list(map(int, input().split(' ')))
m = int(input())
for i in range(m):
	b = list(map(int, input().split(' ')))
	(j, l, r) = (b[0] - 1, b[0] - 2, b[0])
	if l >= 0:
		a[l] += b[1] - 1
	if r < len(a):
		a[r] += a[j] - b[1]
	a[j] = 0
for i in range(len(a)):
	print(a[i])


def see_amount_of_birds_on_each_wire():
	for i in wire_and_fired_bird_list:
		x = i[0] - 1
		y = i[1]
		if x < number_of_wires - 1:
			number_of_birds_on_wires[x + 1] += abs(number_of_birds_on_wires[x] - y)
		if x > 0:
			number_of_birds_on_wires[x - 1] += abs(y - 1)
		number_of_birds_on_wires[x] = 0
wire_and_fired_bird_list = []
number_of_wires = int(input())
number_of_birds_on_wires = input()
number_of_birds_on_wires = [int(i) for i in number_of_birds_on_wires.split()]
number_of_shots = int(input())
for i in range(number_of_shots):
	wire_and_fired_bird = input()
	wire_and_fired_bird_list.append([int(i) for i in wire_and_fired_bird.split()])
see_amount_of_birds_on_each_wire()
for i in number_of_birds_on_wires:
	print(i)


n = int(input())
l = list(map(int, input().split()))
q = int(input())
for _ in range(q):
	(x, y) = map(lambda m: int(m) - 1, input().split())
	nb_right = max(l[x] - 1 - y, 0)
	nb_left = l[x] - 1 - nb_right
	l[x] = 0
	if x + 1 < n:
		l[x + 1] += nb_right
	if x - 1 >= 0:
		l[x - 1] += nb_left
print('\n'.join(list(map(str, l))))


n = int(input())
arr = list(map(int, input().split()))
matrix = [[1 for _ in range(arr[i])] for i in range(n)]
shots = int(input())
for shot in range(shots):
	(wire, y) = list(map(int, input().split()))
	wire = wire - 1
	y = y - 1
	if wire - 1 >= 0:
		matrix[wire - 1].extend(matrix[wire][:y])
	if wire + 1 < n:
		matrix[wire + 1].extend(matrix[wire][y + 1:])
	matrix[wire] = []
for i in matrix:
	print(len(i))


n = int(input())
s = [int(i) for i in input().split()]
m = int(input())
d = {}
k = 0
for i in range(0, len(s)):
	d[i + 1] = s[i]
for i in range(m):
	(a, b) = [int(i) for i in input().split()]
	if n == 1:
		k = 1
		break
	if a != 1 and a != n:
		c = d[a - 1]
		c = c + (b - 1)
		d[a - 1] = c
		d[a] = d[a] - b
		e = d[a + 1]
		e = e + d[a]
		d[a + 1] = e
		d[a] = 0
	if a == 1:
		d[a] = d[a] - b
		e = d[a + 1]
		e = e + d[a]
		d[a + 1] = e
		d[a] = d[a] - d[a]
	if a == n:
		c = d[a - 1]
		c = c + (b - 1)
		d[a - 1] = c
		d[a] = 0
if k > 0:
	print(0)
else:
	for (i, j) in d.items():
		print(j)


def birds(n, arr):
	q = int(input())
	for i in range(q):
		(x, y) = map(int, input().split())
		arr[x - 1] += y - 1
		arr[x + 1] += arr[x] - y
		arr[x] = 0
	for i in range(n):
		print(arr[i + 1])
	return
n = int(input())
arr = [int(arr) for arr in input().split()]
arrnew = [0]
for i in range(n):
	arrnew.append(arr[i])
arrnew.append(0)
birds(n, arrnew)


kprvda = int(input())
provoda = list(map(int, input().split(' ')))
killed = int(input())
for i in range(killed):
	(x, y) = map(int, input().split(' '))
	up = y - 1
	dn = provoda[x - 1] - y
	provoda[x - 1] -= 1
	if x - 2 == -1:
		provoda[x - 1] -= up
	else:
		provoda[x - 2] += up
		provoda[x - 1] -= up
	if x == kprvda:
		provoda[x - 1] -= dn
	else:
		provoda[x] += dn
		provoda[x - 1] -= dn
for i in range(0, kprvda, 1):
	print(provoda[i])


nl = int(input())
wires = input().split()
wires = list(map(int, wires))
shots = int(input())
t = []
for i in range(0, shots):
	(x, y) = input().split()
	t.append((int(x), int(y)))
for i in range(0, len(t)):
	if t[i][0] - 2 >= 0:
		wires[t[i][0] - 2] = wires[t[i][0] - 2] + t[i][1] - 1
	if t[i][0] < len(wires):
		wires[t[i][0]] = wires[t[i][0]] + wires[t[i][0] - 1] - t[i][1]
	wires[t[i][0] - 1] = 0
for x in wires:
	print(x)


def main():
	wires = int(input())
	ls = list(map(int, input().split()))
	shots = int(input())
	while shots > 0:
		(w, b) = map(int, input().split())
		if 1 < w < wires:
			temp = ls[w - 1]
			ls[w - 1] = 0
			ls[w - 2] += b - 1
			ls[w] += temp - b
		elif w == 1:
			temp = ls[w - 1]
			ls[0] = 0
			if wires > 1:
				ls[1] += temp - b
		else:
			temp = ls[w - 1]
			ls[w - 1] = 0
			if wires > 1:
				ls[w - 2] += b - 1
		shots -= 1
	for i in ls:
		print(i)
main()


n = int(input())
values = list(map(int, input().split()))
q = int(input())
for i in range(q):
	(a, b) = map(int, input().split())
	a = a - 1
	x = 0
	y = 0
	if a > 0:
		values[a - 1] += b - 1
		x = b - 1
	if a < n - 1:
		values[a + 1] += values[a] - b
		y = values[a] - b
	values[a] = 0
for i in range(n):
	print(values[i])


n = int(input())
a = list(map(int, input().split()))
moves = int(input())
if n == 1:
	if moves != 0:
		(wire, bird) = map(int, input().split())
		print(0)
	else:
		print(a[0])
else:
	for i in range(moves):
		(wire, bird) = map(int, input().split())
		if wire - 1 == 0:
			left = 0
			right = a[wire - 1] - bird
			a[wire] = a[wire] + right
			a[wire - 1] = 0
		elif wire == n:
			left = bird - 1
			a[wire - 2] = a[wire - 2] + left
			a[wire - 1] = 0
		else:
			left = bird - 1
			right = a[wire - 1] - bird
			a[wire - 2] = a[wire - 2] + left
			a[wire] = a[wire] + right
			a[wire - 1] = 0
	for i in a:
		print(i)


n = int(input())
l = list(map(int, input().split()))
n1 = int(input())
for i in range(n1):
	(x, y) = map(int, input().split())
	if len(l) == 1:
		l[0] = 0
	elif x == 1:
		l[x] += l[x - 1] - y
		l[x - 1] = 0
	elif x == len(l):
		l[x - 2] += y - 1
		l[x - 1] = 0
	else:
		l[x - 2] += y - 1
		l[x] += l[x - 1] - y
		l[x - 1] = 0
for i in l:
	print(i)


n = int(input())
a = list(map(int, input().split()))
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if x < n and x > 0:
		a[x] += a[x - 1] - y
	if x > 1:
		a[x - 2] += y - 1
	if x > 0:
		a[x - 1] = 0
for i in a:
	print(i)


n = int(input())
l = list(map(int, input().split()))
m = int(input())
l1 = []
m1 = m
while m:
	(x, y) = map(int, input().split())
	if n == 1:
		l[0] = 0
	elif x == 1:
		ans = l[0] - y
		l[1] = l[1] + ans
		l[0] = 0
	elif x == n:
		ans = y - 1
		l[n - 2] = ans + l[n - 2]
		l[n - 1] = 0
	else:
		ans1 = l[x - 1] - y
		ans2 = y - 1
		l[x] = l[x] + ans1
		l[x - 2] = l[x - 2] + ans2
		l[x - 1] = 0
	m = m - 1
for i in l:
	print(i)


x = int(input())
a = list(map(int, input().split()))
r = int(input())
z = []
for i in range(r):
	a1 = list(map(int, input().split()))
	if a1[0] < x:
		a[a1[0]] = a[a1[0]] + a[a1[0] - 1] - a1[1]
	if a1[0] > 1:
		a[a1[0] - 2] = a[a1[0] - 2] + a1[1] - 1
	a[a1[0] - 1] = 0
for i in range(x):
	print(a[i])


n = int(input())
l = [0] + list(map(int, input().split())) + [0]
m = int(input())
for _ in range(m):
	(x, y) = map(int, input().split())
	l[x - 1] += y - 1
	l[x + 1] += l[x] - y
	l[x] = 0
print('\n'.join(map(str, l[1:-1])))


n = int(input())
A = list(map(int, input().split()))
m = int(input())
for i in range(m):
	(x, y) = map(int, input().split())
	w = x - 1
	dl = A[w] - y
	dr = y - 1
	if len(A) > 1:
		if x == 1:
			A[x] = A[x] + dl
			A[w] = 0
		elif x == n:
			A[w - 1] = A[w - 1] + dr
			A[w] = 0
		else:
			A[w - 1] = A[w - 1] + dr
			A[x] = A[x] + dl
			A[w] = 0
	else:
		A = [0]
for j in A:
	print(j)


n = int(input())
s = [0] + list(map(int, input().split())) + [0]
m = int(input())
for i in range(m):
	(a, b) = map(int, input().split())
	s[a + 1] += s[a] - b
	s[a] = 0
	s[a - 1] += b - 1
for i in range(n):
	print(s[i + 1])


def oskols(n, w, m, s):
	for i in range(m):
		sw = s[i][0]
		bird = s[i][1]
		if sw > 1:
			w[sw - 1 - 1] += bird - 1
		if sw < n:
			w[sw + 1 - 1] += w[sw - 1] - bird
		w[sw - 1] = 0
	return w
n = int(input().strip())
w = list(map(int, input().strip().split()))
assert n == len(w)
m = int(input().strip())
s = list()
for i in range(m):
	s.append(list(map(int, input().strip().split())))
r = oskols(n, w, m, s)
for x in r:
	print(x)


n = int(input())
l = list(map(int, input().split()))
m = int(input())

def bird(a, b):
	if n != 1:
		if a != 1 and a != n:
			l[a - 2] += b - 1
			l[a] += l[a - 1] - b
			l[a - 1] = 0
		if a == 1:
			l[a] += l[a - 1] - b
			l[a - 1] = 0
		if a == n:
			l[a - 2] += b - 1
			l[a - 1] = 0
	else:
		l[n - 1] = 0
for i in range(m):
	(a, b) = map(int, input().split())
	bird(a, b)
for i in l:
	print(i)


n = int(input())
a = list(map(int, input().split()))
m = int(input())
d = []
for i in range(len(a)):
	d.append(a[i])
for i in range(m):
	(x, y) = map(int, input().split())
	x -= 1
	if len(d) > x + 1 > 1:
		d[x - 1] += y - 1
		d[x + 1] += d[x] - y
		d[x] = 0
	elif x + 1 == 1 and len(d) > 1:
		d[x + 1] += d[x] - y
		d[x] = 0
	elif x + 1 == len(d):
		d[x - 1] += y - 1
		d[x] = 0
	else:
		d[x] = 0
for j in d:
	print(j)


l1 = []
l2 = []
n = int(input())
l3 = [int(number) for number in input().split(' ')]
for i in l3:
	for j in range(i):
		l2.append(0)
	l1.append(l2)
	l2 = list()
m = int(input())
for i in range(m):
	l4 = [int(num) for num in input().split(' ')]
	x = l4[0]
	y = l4[1]
	for j in range(len(l1[x - 1]) - y):
		if x < n:
			l1[x].append(0)
	for j in range(y - 1):
		if x - 2 >= 0:
			l1[x - 2].append(0)
	l1[x - 1] = list()
for i in l1:
	print(len(i))


import sys
from functools import reduce
from collections import Counter
import time
import datetime
from math import sqrt, gcd

def ip():
	return int(sys.stdin.readline())

def sip():
	return sys.stdin.readline()

def mip():
	return map(int, sys.stdin.readline().split())

def mips():
	return map(str, sys.stdin.readline().split())

def lip():
	return list(map(int, sys.stdin.readline().split()))

def matip(n, m):
	lst = []
	for i in range(n):
		arr = lip()
		lst.insert(i, arr)
	return lst

def factors(n):
	return list(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def minJumps(arr, n):
	jumps = [0 for i in range(n)]
	if n == 0 or arr[0] == 0:
		return float('inf')
	jumps[0] = 0
	for i in range(1, n):
		jumps[i] = float('inf')
		for j in range(i):
			if i <= j + arr[j] and jumps[j] != float('inf'):
				jumps[i] = min(jumps[i], jumps[j] + 1)
				break
	return jumps[n - 1]

def dic(arr):
	return Counter(arr)

def check_prime(n):
	if n < 2:
		return False
	for i in range(2, int(n ** 0.5) + 1, 2):
		if n % i == 0:
			return False
	return True
n = ip()
arr = lip()
m = ip()
arr.insert(0, 0)
arr.insert(n + 1, 0)
while m:
	m -= 1
	(x, y) = mip()
	arr[x - 1] += y - 1
	arr[x + 1] += arr[x] - y
	arr[x] = 0
for i in range(1, n + 1):
	print(arr[i])


n = int(input())
a = list(map(int, input().split()))
shots = int(input())
for i in range(shots):
	(wire, oskol) = map(int, input().split())
	if wire == 1:
		if wire == len(a):
			a[wire - 1] = 0
		else:
			a[1] += a[0] - oskol
			a[0] = 0
	elif wire == len(a):
		t = a[wire - 1] - oskol
		a[wire - 2] += a[wire - 1] - t - 1
		a[wire - 1] = 0
	else:
		t = a[wire - 1] - oskol
		a[wire] += t
		a[wire - 2] += a[wire - 1] - t - 1
		a[wire - 1] = 0
for i in a:
	print(abs(i))


w = int(input())
b = list(map(int, input().split()))
s = int(input())
for x in range(s):
	(i, k) = input().split()
	i = int(i) - 1
	k = int(k)
	r = b[i] - k
	l = k - 1
	if i - 1 >= 0:
		b[i - 1] += l
	if i + 1 <= w - 1:
		b[i + 1] += r
	b[i] = b[i] - l - r - 1
for x in b:
	print(x)


num = int(input())
list0 = [int(i) for i in input().split()]
num0 = int(input())
list1 = []
for i in range(num0):
	x = [int(i) for i in input().split()]
	list1.append(x)
for i in list1:
	i[0] -= 1
for i in list1:
	if i[0] == num - 1:
		list0[i[0]] -= list0[i[0]] - i[1] + 1
	else:
		list0[i[0] + 1] += list0[i[0]] - i[1]
		list0[i[0]] -= list0[i[0]] - i[1] + 1
	if i[0] == 0:
		list0[i[0]] -= i[1] - 1
	else:
		list0[i[0] - 1] += i[1] - 1
		list0[i[0]] -= i[1] - 1
for i in list0:
	print(i)


import itertools
import math
from collections import defaultdict

def input_ints():
	return list(map(int, input().split()))

def solve():
	n = int(input())
	a = input_ints()
	q = int(input())
	for i in range(q):
		(x, y) = input_ints()
		x -= 1
		if x:
			a[x - 1] += y - 1
		if x < n - 1:
			a[x + 1] += a[x] - y
		a[x] = 0
	for x in a:
		print(x)
solve()


n = int(input())
birds = str(input())
wires = birds.split()
for i in range(n):
	wires[i] = int(wires[i])
m = int(input())
loc = []
for i in range(m):
	string = str(input())
	tmp = string.split()
	for j in range(2):
		tmp[j] = int(tmp[j])
	loc.append(tmp)
for i in range(m):
	l = loc[i][1] - 1
	r = wires[loc[i][0] - 1] - loc[i][1]
	if n == 1:
		wires[0] = 0
	elif loc[i][0] == 1:
		wires[0] = 0
		wires[1] += r
	elif loc[i][0] == n:
		wires[n - 1] = 0
		wires[n - 2] += l
	else:
		wires[loc[i][0] - 1] = 0
		wires[loc[i][0] - 2] += l
		wires[loc[i][0]] += r
for i in wires:
	print(i)


from sys import stdin
m = int(stdin.readline())
a = list(map(int, stdin.readline().split()))
a.insert(0, 0)
a.append(0)
n = int(stdin.readline())
for i in range(n):
	(x, y) = map(int, stdin.readline().split())
	a[x - 1] += y - 1
	a[x + 1] += a[x] - y
	a[x] = 0
for j in range(1, m + 1):
	print(a[j])


n = int(input())
wires = list(map(int, input().split()))
m = int(input())
for i in range(m):
	(x, y) = map(int, input().split())
	x = x - 1
	left = y - 1
	right = wires[x] - y
	wires[x] = 0
	if x > 0:
		wires[x - 1] += left
	if x < n - 1:
		wires[x + 1] += right
print('\n'.join(map(str, wires)))


def main():
	n = int(input().strip())
	aa = list(map(int, input().strip().split()))
	m = int(input().strip())
	l = list((tuple(map(int, input().strip().split())) for _ in range(m)))
	for (y, x) in l:
		(up, down) = (x - 1, aa[y - 1] - x)
		if y > 1:
			aa[y - 2] += up
		if y < n:
			aa[y] += down
		aa[y - 1] = 0
	for a in aa:
		print(a)
main()


n = int(input())
s = [int(i) for i in input().split()]
a = int(input())
for i in range(a):
	(c, b) = [int(i) for i in input().split()]
	if c != 1:
		s[c - 2] = s[c - 2] + (b - 1)
	if c != n:
		s[c] = s[c] + s[c - 1] - b
	s[c - 1] = 0
for i in range(n):
	print(s[i])


n = int(input())
a = list(map(int, input().split()))
a = [0] + a + [0]
k = int(input())
for q in range(k):
	(x, y) = map(int, input().split())
	a[x + 1] += a[x] - y
	a[x - 1] += y - 1
	a[x] = 0
for i in range(1, n + 1):
	print(a[i])


import sys
my_file = sys.stdin
n = int(my_file.readline().strip('\n'))
a = [int(i) for i in my_file.readline().strip('\n').split()]
m = int(my_file.readline().strip('\n'))
x = []
y = []
for i in range(m):
	line = [int(k) for k in my_file.readline().strip('\n').split()]
	x.append(line[0] - 1)
	y.append(line[1])
for (x, y) in zip(x, y):
	try:
		if x - 1 >= 0:
			a[x - 1] += y - 1
	except:
		pass
	try:
		if x + 1 < n:
			a[x + 1] += a[x] - y
	except:
		pass
	a[x] = 0
for i in a:
	print(i)


n = int(input())
w = input().split(' ')
wir = list(map(int, w))
m = int(input())
for i in range(m):
	a = input().split(' ')
	x = int(a[0])
	y = int(a[1])
	if len(wir) == 1:
		wir[0] = 0
	elif x == 1:
		wir[x] = wir[x] + wir[x - 1] - y
		wir[x - 1] = 0
	elif x == n:
		wir[x - 2] = wir[x - 2] + y - 1
		wir[x - 1] = 0
	else:
		wir[x - 2] = wir[x - 2] + y - 1
		wir[x] += wir[x - 1] - y
		wir[x - 1] = 0
for i in wir:
	print(i)


n = int(input())
a = [0] + list(map(int, input().split())) + [0]
if len(a) != n + 2:
	raise ValueError
m = int(input())
for i in range(m):
	(x, y) = map(int, input().split())
	a[x + 1] += a[x] - y
	a[x] = 0
	a[x - 1] += y - 1
for i in range(n):
	print(a[i + 1])


n = int(input())
l = list(map(int, input().split()))
for i in range(int(input())):
	(x, y) = map(int, input().split())
	if x - 1 != 0:
		l[x - 2] += y - 1
	if x != n:
		l[x] += l[x - 1] - y
	l[x - 1] = 0
for j in l:
	print(j)


INP = lambda : map(int, input().split())
n = int(input())
a = [*INP()]
for i in range(int(input())):
	(x, y) = INP()
	if x > 1:
		a[x - 2] += y - 1
	if x < n:
		a[x] += a[x - 1] - y
	a[x - 1] = 0
for bird in a:
	print(bird)


n = int(input())
lst = list(map(int, input().split()))
c = int(input())
for i in range(c):
	(x, y) = map(int, input().split())
	x -= 1
	if x != 0:
		lst[x - 1] += y - 1
	if x != n - 1:
		lst[x + 1] += lst[x] - y
	lst[x] = 0
for i in lst:
	print(i)


n = int(input())
birds = map(int, input().split())
birds = list(birds)
for i in range(n):
	birds.append(0)
m = int(input())
for i in range(m):
	shoting = map(int, input().split())
	shoting = list(shoting)
	shoting[0] -= 1
	if shoting[0] != 0:
		birds[shoting[0] - 1] += shoting[1] - 1
	if shoting[0] != n:
		birds[shoting[0] + 1] += birds[shoting[0]] - shoting[1]
	birds[shoting[0]] = 0
for i in range(n):
	print(birds[i])


n = int(input())
birds = list(map(int, input().split(' ')))
m = int(input())
for i in range(m):
	shot = list(map(int, input().split(' ')))
	shot[0] -= 1
	if shot[0] < n - 1:
		birds[shot[0] + 1] += birds[shot[0]] - shot[1]
	if shot[0] != 0:
		birds[shot[0] - 1] += shot[1] - 1
	birds[shot[0]] = 0
for bird in birds:
	print(bird)


n = int(input())
num_birds = list(map(int, input().split()))
m = int(input())
for _ in range(m):
	(wire, bird) = map(int, input().split())
	left_birds = bird - 1
	right_birds = num_birds[wire - 1] - bird
	num_birds[wire - 1] = 0
	if wire > 1:
		num_birds[wire - 2] += left_birds
	if wire < n:
		num_birds[wire] += right_birds
for i in num_birds:
	print(i)


n = int(input())
l = [0]
k = [int(x) for x in input().split()]
l = l + k
m = int(input())
for _ in range(m):
	(w, b) = [int(x) for x in input().split()]
	if w - 1 > 0:
		l[w - 1] += b - 1
	if w + 1 <= n:
		l[w + 1] += l[w] - b
	l[w] = 0
for i in range(1, len(l)):
	print(l[i])


n = int(input())
p = list(map(int, input().split()))
ol = int(input())
for x in range(ol):
	(c, v) = list(map(int, input().split()))
	ka = c - 1
	if ka - 1 >= 0:
		kam = len(list(range(1, v)))
		p[ka - 1] += kam
	else:
		pass
	if ka + 1 < n:
		kam = len(list(range(v + 1, p[ka] + 1)))
		p[ka + 1] += kam
	else:
		pass
	p[ka] = 0
for item in p:
	print(item)


int(input())
BirdBoxes = list(map(int, input().split()))
for i in range(int(input())):
	(n, BirdKilled) = map(int, input().split())
	n = n - 1
	if len(BirdBoxes) - 1 == 0:
		BirdBoxes[n] = 0
		break
	if n == 0:
		BirdBoxes[1] += BirdBoxes[0] - BirdKilled
	elif n == len(BirdBoxes) - 1:
		BirdBoxes[-2] += BirdKilled - 1
	else:
		BirdBoxes[n + 1] += BirdBoxes[n] - BirdKilled
		BirdBoxes[n - 1] += BirdKilled - 1
	BirdBoxes[n] = 0
for x in BirdBoxes:
	print(x)


rd = lambda : list(map(int, input().split()))
(n,) = rd()
a = [0] + rd() + [0]
for i in range(rd()[0]):
	(x, y) = rd()
	a[x - 1] += y - 1
	a[x + 1] += a[x] - y
	a[x] = 0
print('\n'.join(map(str, a[1:1 + n])))


n = int(input())
birds = list(map(int, input().split()))
m = int(input())
while m:
	(x, y) = map(int, input().split())
	x -= 1
	left = len(range(1, y))
	right = len(range(y + 1, birds[x] + 1))
	birds[x] = 0
	if x - 1 >= 0:
		birds[x - 1] += left
	if x + 1 < n:
		birds[x + 1] += right
	m -= 1
for bird in birds:
	print(bird)


def update(line, birds):
	if len(inp) == 1:
		inp[line] = 0
	elif line == 0:
		inp[line + 1] += inp[line] - birds
		inp[line] = 0
	elif line == len(inp) - 1:
		inp[line - 1] += birds - 1
		inp[line] = 0
	else:
		inp[line + 1] += inp[line] - birds
		inp[line - 1] += birds - 1
		inp[line] = 0
_ = input()
inp = list(map(int, input().rstrip().split()))
times = int(input())
for i in range(0, times):
	order = list(map(int, input().rstrip().split()))
	line = order[0] - 1
	birds = order[1]
	update(line, birds)
for i in inp:
	print(i)


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def shot(l, a, b):
	a -= 1
	if len(l) == 1:
		return [0]
	if a == 0:
		l[a + 1] += l[a] - b
		l[a] = 0
		return l
	if a == len(l) - 1:
		l[a - 1] += b - 1
		l[a] = 0
		return l
	else:
		l[a - 1] += b - 1
		l[a + 1] += l[a] - b
		l[a] = 0
		return l
n = inp()
wires = inlt()
m = inp()
for i in range(m):
	(a, b) = invr()
	wires = shot(wires, a, b)
for w in wires:
	print(w)


n = int(input())
str = input()
brids = str.split(' ')
for i in range(0, len(brids)):
	brids[i] = int(brids[i])
m = int(input())
for i in range(0, m):
	(x, y) = map(int, input().split(' '))
	x -= 1
	if x != 0:
		brids[x - 1] += y - 1
	if x != n - 1:
		brids[x + 1] += brids[x] - y
	brids[x] = 0
for i in brids:
	print(i)


n = int(input())
wires = list(map(int, input().split()))
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	left = y - 1
	right = wires[x - 1] - y
	wires[x - 1] = 0
	if x - 2 >= 0:
		wires[x - 2] += left
	if len(wires) > x:
		wires[x] += right
for i in wires:
	print(i)


n = int(input())
listt = list(map(int, input().split()))
listt = [0] + listt + [0]
fire = int(input())
for i in range(fire):
	(p, shot) = map(int, input().split())
	if shot <= listt[p]:
		right = listt[p] - shot
		if right >= 0:
			left = shot - 1
			if p - 1 >= 0:
				listt[p - 1] += left
			if p + 1 < len(listt):
				listt[p + 1] += right
		listt[p] = 0
	else:
		listt[p - 1] += listt[p]
		listt[p] = 0
for i in range(1, n + 1):
	print(listt[i])


import math
n = int(input())
a = []
a = list(map(int, input().strip().split()))
s = int(input())
for i in range(s):
	(x, y) = map(int, input().split())
	x -= 1
	if len(a) == 1 and s == 1:
		a[0] = 0
		break
	if x == 0:
		a[x + 1] += a[x] - y
		a[x] = 0
	elif x == n - 1:
		a[x - 1] += y - 1
		a[x] = 0
	else:
		a[x - 1] += y - 1
		a[x + 1] += a[x] - y
		a[x] = 0
for i in a:
	print(i)


n = int(input())
l = list(map(int, input().split()))
shots = int(input())
for i in range(shots):
	(wire, bird) = map(int, input().split())
	i = wire - 1
	left = bird - 1
	right = l[i] - bird
	if wire == n:
		l[i - 1] += left
		l[i] = 0
	elif wire == 1:
		l[i + 1] += right
		l[i] = 0
	else:
		l[i + 1] += right
		l[i - 1] += left
		l[i] = 0
for i in range(n):
	print(l[i])


a = int(input())
b = list(map(int, input().rstrip().split()))
m = int(input())
for i in range(m):
	l = list(map(int, input().rstrip().split()))
	if len(b) == 1:
		b = [0]
		break
	else:
		x = l[0]
		y = l[1]
		if x == 1:
			b[x] += b[x - 1] - y
			b[x - 1] = 0
		elif x == len(b):
			b[x - 2] += y - 1
			b[x - 1] = 0
		else:
			b[x - 2] += y - 1
			b[x] += b[x - 1] - y
			b[x - 1] = 0
for i in b:
	print(i)


n = int(input())
a = [int(v) for v in input().split()]
m = int(input())
if n == 1:
	if m == 0:
		print(a[0])
		raise SystemExit
	else:
		print(0)
		raise SystemExit
for i in range(m):
	(x, y) = [int(v) for v in input().split()]
	if x == 1:
		a[1] = a[1] + a[0] - y
		a[0] = 0
	elif x == n:
		a[n - 1] = 0
		a[n - 2] = a[n - 2] + y - 1
	else:
		a[x - 2] = a[x - 2] + y - 1
		a[x] = a[x] + a[x - 1] - y
		a[x - 1] = 0
for i in range(n):
	print(a[i])


n = int(input())
ct = [int(x) for x in input().split()]
m = int(input())
for x in range(m):
	(a, b) = map(int, input().split(' '))
	a -= 1
	if b > 1 and a > 0:
		ct[a - 1] += b - 1
	if b < ct[a] and a < n - 1:
		ct[a + 1] += ct[a] - b
	ct[a] = 0
for x in ct:
	print(x)


wires = int(input())
birds_on_wires = list(map(int, input().split()))
m = int(input())
if m == 0:
	for x in birds_on_wires:
		print(x)
elif len(birds_on_wires) == 1:
	input()
	print(0)
else:
	for x in range(m):
		(w, k) = list(map(int, input().split()))
		w -= 1
		if w == 0:
			birds_on_wires[w + 1] += birds_on_wires[w] - k
			birds_on_wires[w] = 0
		elif w == len(birds_on_wires) - 1:
			birds_on_wires[w] = 0
			birds_on_wires[w - 1] += k - 1
		else:
			birds_on_wires[w - 1] += k - 1
			birds_on_wires[w + 1] += birds_on_wires[w] - k
			birds_on_wires[w] = 0
	for x in birds_on_wires:
		print(x)


n = int(input())
box = list(map(int, input().split()))
m = int(input())
for i in range(m):
	(index, number) = map(int, input().split())
	index -= 1
	if index != 0:
		box[index - 1] += number - 1
	if index != n - 1:
		box[index + 1] += box[index] - number
	box[index] = 0
print('\n'.join([str(x) for x in box]))


a = int(input())
mat = [int(j) for j in input().split()]
m = int(input())
for i in range(m):
	(c, n) = map(int, input().split())
	if c != 1 and c != a:
		mat[c - 2] += n - 1
		mat[c] += mat[c - 1] - n
		mat[c - 1] = 0
	elif c == 1 and c != a:
		mat[c] += mat[c - 1] - n
		mat[c - 1] = 0
	elif c == a and c != 0:
		mat[c - 2] += n - 1
		mat[c - 1] = 0
	else:
		mat[c - 1] = 0
for i in range(a):
	print(mat[i])


n = int(input())
wires = [int(c) for c in input().split()]
m = int(input())
for _ in range(m):
	(x, y) = map(int, input().split())
	x -= 1
	if n > 1:
		if 0 < x < n - 1:
			wires[x - 1] += max(0, y - 1)
			wires[x + 1] += max(0, wires[x] - y)
		if x == 0:
			wires[1] += max(0, wires[0] - y)
		if x == n - 1:
			wires[n - 2] += max(0, y - 1)
	wires[x] = 0
for i in range(n):
	print(wires[i])


import sys
import math
input = sys.stdin.readline
n = int(input())
a = list(map(int, input().split()))
t = int(input())
while t:
	(i, pos) = map(int, input().split())
	i -= 1
	if i > 0:
		a[i - 1] += pos - 1
	if i + 1 < n:
		a[i + 1] += a[i] - pos
	t -= 1
	a[i] = 0
for el in a:
	print(el)


n = int(input(''))
a = input('').split(' ')
a = [int(i) for i in a]
m = int(input(''))
for i in range(m):
	shoot = input('').split(' ')
	x = int(shoot[0])
	y = int(shoot[1])
	wire_shooted = a[x - 1]
	a[x - 1] = 0
	if x == 1 and x != n:
		a[x] += wire_shooted - y
	elif x == n and x != 1:
		a[x - 2] += y - 1
	elif x != n and x != 1:
		a[x - 2] += y - 1
		a[x] += wire_shooted - y
for w in a:
	print(w)


n = int(input())
l = [int(x) for x in input().split()]
l.insert(0, -1)
t = int(input())
while t:
	t -= 1
	q = [int(x) for x in input().split()]
	try:
		l[q[0] - 1] += q[1] - 1
	except:
		pass
	try:
		l[q[0] + 1] += l[q[0]] - q[1]
	except:
		pass
	l[q[0]] = 0
for i in range(1, n + 1):
	print(l[i])


def solve(arr, inputArr):
	x = inputArr[0] - 1
	y = inputArr[1]
	if x != 0:
		arr[x - 1] = arr[x - 1] + y - 1
	if x != len(arr) - 1:
		arr[x + 1] = arr[x + 1] + (arr[x] - y)
	arr[x] = 0
	return arr
h = input()
arr = input().split()
arr = [int(x) for x in arr]
h = input()
for i in range(int(h)):
	secArr = input().split()
	secArr = [int(x) for x in secArr]
	arr = solve(arr, secArr)
print('\n'.join((str(x) for x in arr)))


n = int(input())
l = list(map(int, input().split()))
m = int(input())
d = []
d.insert(0, [0, 0])
for i in range(1, n + 1, 1):
	d.append([i, l[i - 1]])
for _ in range(m):
	(x, y) = map(int, input().split())
	try:
		d[x - 1][1] += y - 1
		d[x + 1][1] += d[x][1] - y
		d[x][1] = 0
	except:
		d[x][1] = 0
		pass
for i in range(1, len(d)):
	print(d[i][1])


n = int(input())
pack = [0] * n
s = input()
s = s.split()
for i in range(n):
	pack[i] = int(s[i])
k = int(input())
for i in range(k):
	t = input()
	t = t.split()
	Pn = int(t[0]) - 1
	Bn = int(t[1])
	r = pack[Pn] - Bn
	l = Bn - 1
	if Pn > 0 and Pn < len(pack) - 1:
		pack[Pn] = 0
		pack[Pn + 1] += r
		pack[Pn - 1] += l
	elif Pn <= 0 and Pn >= len(pack) - 1:
		pack[Pn] = 0
	elif Pn <= 0:
		pack[Pn] = 0
		pack[Pn + 1] += r
	elif Pn >= len(pack) - 1:
		pack[Pn] = 0
		pack[Pn - 1] += l
for i in range(n):
	print(pack[i])


n = int(input())
l_w = list(map(int, input().split()))
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if x - 2 >= 0:
		l_w[x - 2] += y - 1
	if x != n:
		l_w[x] += l_w[x - 1] - y
	l_w[x - 1] = 0
print('\n'.join((str(x) for x in l_w)))


R = lambda : map(int, input().split())
n = int(input())
a = list(R())
m = int(input())
for i in range(m):
	(x, y) = R()
	if n == 1:
		exit(print(0))
	if x == 1:
		a[1] += a[0] - y
		a[0] = 0
	elif x == n:
		a[n - 2] += y - 1
		a[n - 1] = 0
	else:
		a[x - 2] += y - 1
		a[x] += a[x - 1] - y
		a[x - 1] = 0
for i in a:
	print(i)


x = input()
x = list(map(int, input().strip().split()))
y = input()
for i in range(int(y)):
	listt = list(map(int, input().strip().split()))
	if listt[0] - 1 > 0:
		x[listt[0] - 2] = x[listt[0] - 2] + listt[1] - 1
	if listt[0] < len(x):
		x[listt[0]] = x[listt[0]] + x[listt[0] - 1] - listt[1]
	x[listt[0] - 1] = 0
print(*x, sep='\n')


n = int(input())
lst = list(map(int, input().split()))
m = int(input())
for i in range(m):
	(p, k) = list(map(int, input().split()))
	p -= 1
	tempp = lst[p] - k
	tempm = lst[p] - tempp - 1
	if p - 1 >= 0 and p + 1 < n:
		lst[p - 1] += tempm
		lst[p + 1] += tempp
	elif p + 1 < n:
		lst[p + 1] += tempp
	elif p - 1 >= 0:
		lst[p - 1] += tempm
	lst[p] = 0
for i in range(n):
	print(lst[i])


n = int(input())
q = input().split(' ')
a = [None] * n
for i in range(0, n):
	a[i] = int(q[i])
m = int(input())
for i in range(0, m):
	q = input().split(' ')
	if int(q[0]) != n and int(q[0]) != 1:
		a[int(q[0]) - 2] = a[int(q[0]) - 2] + int(q[1]) - 1
		a[int(q[0])] = a[int(q[0])] + a[int(q[0]) - 1] - int(q[1])
		a[int(q[0]) - 1] = 0
	if int(q[0]) == n:
		if n != 1:
			a[int(q[0]) - 2] = a[int(q[0]) - 2] + int(q[1]) - 1
			a[int(q[0]) - 1] = 0
		else:
			a[int(q[0]) - 1] = 0
	if int(q[0]) == 1:
		if n != 1:
			a[int(q[0])] = a[int(q[0])] + a[int(q[0]) - 1] - int(q[1])
			a[int(q[0]) - 1] = 0
		else:
			a[int(q[0]) - 1] = 0
for i in range(0, n):
	print(a[i])


n = int(input())
a = list(map(int, input().split()))
m = int(input())
s = []
r = []
for i in range(m):
	(x, y) = input().split()
	s.append(int(x))
	r.append(int(y))
for i in range(len(s)):
	q = s[i] - 1
	w = r[i]
	if len(a) == 1:
		a[0] = 0
	elif q == 0:
		a[q + 1] += a[q] - w
		a[q] = 0
	elif q == len(a) - 1:
		a[q - 1] += r[i] - 1
		a[q] = 0
	else:
		a[q + 1] += a[q] - r[i]
		a[q - 1] += r[i] - 1
		a[q] = 0
for i in a:
	print(i)


n = int(input())
a = [int(x) for x in input().split()]
m = int(input())
xy = []
for w in range(m):
	xy.append([int(t) for t in input().split()])
for i in range(m):
	if xy[i][0] == 1 and xy[i][0] != n:
		a[xy[i][0]] = a[xy[i][0]] + a[xy[i][0] - 1] - xy[i][1]
		a[xy[i][0] - 1] = 0
	elif xy[i][0] == n:
		a[xy[i][0] - 2] = a[xy[i][0] - 2] + xy[i][1] - 1
		a[xy[i][0] - 1] = 0
	else:
		a[xy[i][0] - 2] = a[xy[i][0] - 2] + xy[i][1] - 1
		a[xy[i][0]] = a[xy[i][0]] + a[xy[i][0] - 1] - xy[i][1]
		a[xy[i][0] - 1] = 0
for i in range(n):
	print(a[i])


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_intList_from_str = lambda : list(map(int, list(sys.stdin.readline().strip())))
get_charList_from_str = lambda : list(sys.stdin.readline().strip())
get_char_list = lambda : sys.stdin.readline().strip().split()
get_int = lambda : int(sys.stdin.readline())
pt = lambda x: sys.stdout.write(str(x))
n = get_int()
birds = get_int_list()
m = get_int()
matrix = [get_int_list() for i in range(m)]
for i in range(m):
	(i, a) = matrix[i]
	if i == 1:
		if n > 1:
			birds[i] += birds[i - 1] - a
			birds[i - 1] = 0
		else:
			birds[i - 1] = 0
	elif i == n:
		birds[i - 2] += a - 1
		birds[i - 1] = 0
	else:
		birds[i - 2] += a - 1
		birds[i] += birds[i - 1] - a
		birds[i - 1] = 0
for i in range(n):
	print(birds[i])


N = int(input())
L = list(map(int, input().split()))
Q = int(input())
while Q:
	(X, Y) = map(int, input().split())
	if X - 2 >= 0:
		L[X - 2] += Y - 1
	if X <= N - 1:
		L[X] += L[X - 1] - Y
	L[X - 1] = 0
	Q -= 1
for i in range(N):
	print(L[i])


total_wire = int(input())
birds = list(map(int, input().split()))
total_shots = int(input())
shots = []
for i in range(total_shots):
	shots.append(list(map(int, input().split())))
for shot in shots:
	wire = shot[0] - 1
	bird_killed = shot[1]
	bird_up = bird_killed - 1
	bird_down = birds[wire] - bird_killed
	birds[wire] = 0
	if wire == 0:
		if wire < total_wire - 1:
			birds[wire + 1] = birds[wire + 1] + bird_down
	elif wire == total_wire - 1:
		birds[wire - 1] = birds[wire - 1] + bird_up
	else:
		birds[wire - 1] = birds[wire - 1] + bird_up
		birds[wire + 1] = birds[wire + 1] + bird_down
for bird in birds:
	print(bird)


n = int(input())
a = list(map(int, input().split()))
a.insert(0, 0)
a.append(0)
m = int(input())
for z in range(m):
	(x, y) = input().split()
	x = int(x)
	y = int(y)
	a[x - 1] += y - 1
	a[x + 1] += a[x] - y
	a[x] = 0
for i in range(1, n + 1):
	print(a[i])


n = input()
birds = list(map(int, input().strip().split()))
birds.append(0)
birds.insert(0, 0)
m = int(input())
l = len(birds)
for i in range(m):
	(x, y) = map(int, input().strip().split())
	birds[x - 1] = birds[x - 1] + (y - 1)
	birds[x + 1] += birds[x] - y
	birds[x] = 0
for i in range(1, l - 1):
	print(birds[i])


from sys import stdin
stdin.readline()
a = list()
a.append(0)
for x in stdin.readline().strip().split():
	a.append(int(x))
a.append(0)
m = int(stdin.readline().strip())
for i in range(m):
	(x, y) = [int(x) for x in stdin.readline().strip().split()]
	a[x - 1] += y - 1
	a[x + 1] += a[x] - y
	a[x] = 0
print('\n'.join([str(x) for x in a[1:-1]]))


t = int(input())
l = list(map(int, input().split()))
m = int(input())
dic = list()
for i in range(m):
	n = list(map(int, input().split()))
	dic.append(n)
for i in range(m):
	k = l[dic[i][0] - 1]
	l[dic[i][0] - 1] = 0
	try:
		if dic[i][0] - 2 != -1:
			l[dic[i][0] - 2] = l[dic[i][0] - 2] + dic[i][1] - 1
		l[dic[i][0]] = l[dic[i][0]] + k - dic[i][1]
	except:
		rt = 0
for i in l:
	print(i)


n = int(input())
a = list(map(int, input().split()))
a.insert(0, 0)
a.append(0)
m = int(input())
for i in range(m):
	(j, k) = map(int, input().split())
	a[j - 1] += k - 1
	a[j + 1] += a[j] - k
	a[j] = 0
for i in range(1, n + 1):
	print(a[i])


input()
data = list(map(int, input().split()))
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	n_up = y - 1
	n_down = data[x - 1] - y
	data[x - 1] = 0
	if x > 1:
		data[x - 2] += n_up
	if x < len(data):
		data[x] += n_down
for v in data:
	print(v)


n = int(input())
l = list(map(int, input().split()))
l = [0] + l + [0]
m = int(input())
for i in range(m):
	(x, y) = map(int, input().split())
	l[x - 1] += y - 1
	l[x + 1] += l[x] - y
	l[x] = 0
for i in range(1, n + 1):
	print(l[i])


noOfWires = int(input())
noOfBirdsOnEachWires = [int(x) for x in input().split(' ')]
noOfBirdsKilled = int(input())
for i in range(noOfBirdsKilled):
	birdKilled = [int(x) for x in input().split(' ')]
	wireNo = birdKilled[0] - 1
	birdNo = birdKilled[1]
	birdsOnLeft = birdNo - 1
	birdsOnRight = noOfBirdsOnEachWires[wireNo] - birdNo
	if wireNo != 0:
		noOfBirdsOnEachWires[wireNo - 1] += birdsOnLeft
	noOfBirdsOnEachWires[wireNo] = 0
	if wireNo != noOfWires - 1:
		noOfBirdsOnEachWires[wireNo + 1] += birdsOnRight
print('\n'.join([str(x) for x in noOfBirdsOnEachWires]))


wires = int(input())
birds = [int(x) for x in input().split()]
m = int(input())
if m == 1 and wires == 1:
	print(0)
elif m == 0:
	for i in range(wires):
		print(birds[i])
else:
	counts = {}
	for i in range(wires):
		counts[i + 1] = birds[i]
	for i in range(m):
		pos = [int(x) for x in input().split()]
		if pos[0] - 1 == 0:
			counts[pos[0] + 1] += counts[pos[0]] - pos[1]
			counts[pos[0]] = 0
			continue
		elif pos[0] + 1 > wires:
			counts[pos[0] - 1] += pos[1] - 1
			counts[pos[0]] = 0
			continue
		else:
			counts[pos[0] + 1] += counts[pos[0]] - pos[1]
			counts[pos[0] - 1] += pos[1] - 1
			counts[pos[0]] = 0
	for (k, value) in counts.items():
		print(value)


n = int(input())
wires = list(map(int, input().split()))
shots = int(input())
for i in range(shots):
	(x, y) = map(int, input().split())
	birds = wires[x - 1]
	if birds == 0:
		continue
	left = y - 1
	right = birds - y
	if x != 1:
		wires[x - 2] += left
	if x != len(wires):
		wires[x] += right
	wires[x - 1] = 0
for i in wires:
	print(i)


n = int(input())
al = [0] + list(map(int, input().split())) + [0]
m = int(input())
xyl = [list(map(int, input().split())) for _ in range(m)]
for xy in xyl:
	(x, y) = xy
	al[x - 1] += y - 1
	al[x + 1] += al[x] - y
	al[x] = 0
[print(a) for a in al[1:-1]]


wrs = int(input())
bds = list(map(int, input().split(' ')))
dct = {}
for i in range(wrs):
	dct[i + 1] = bds[i]
sts = int(input())
for i in range(sts):
	st = list(map(int, input().split(' ')))
	wr = st[0]
	bd = st[1]
	if max(dct.keys()) == 1:
		dct[wr] = 0
	elif wr == 1:
		dct[wr + 1] = dct[wr + 1] + (dct[wr] - bd)
		dct[wr] = 0
	elif wr == max(dct.keys()):
		dct[wr - 1] = dct[wr - 1] + (bd - 1)
		dct[wr] = 0
	else:
		dct[wr + 1] = dct[wr + 1] + (dct[wr] - bd)
		dct[wr - 1] = dct[wr - 1] + (bd - 1)
		dct[wr] = 0
for each in dct.values():
	print(each)


length = int(input())
numbers = [int(i) for i in input().split()]
num = int(input())
if num == 0:
	for item in numbers:
		print(item)
for x in range(num):
	values = [int(i) for i in input().split()]
	wire = values[0] - 1
	bird = values[1]
	if wire - 1 >= 0:
		numbers[wire - 1] += bird - 1
	if wire + 1 < len(numbers):
		numbers[wire + 1] = numbers[wire] - bird + numbers[wire + 1]
	numbers[wire] = 0
	if x == num - 1:
		for item in numbers:
			print(item)


def solve():
	n = int(input())
	wires = list(map(int, input().split()))
	shots = int(input())
	for shot in range(shots):
		(wire_idx, bird_idx) = map(int, input().split())
		if wire_idx - 1 != 0:
			wires[wire_idx - 2] += bird_idx - 1
		if wire_idx != n:
			wires[wire_idx] += wires[wire_idx - 1] - bird_idx
		wires[wire_idx - 1] = 0
	for out in wires:
		print(out)
solve()


n1 = int(input())
l = list(map(int, input().split()))
n = int(input())
for i in range(n):
	(a, b) = list(map(int, input().split()))
	a = a - 1
	try:
		if a is 0:
			l[a + 1] = l[a + 1] + l[a] - b
		elif a is n1 - 1:
			l[a - 1] = l[a - 1] + b - 1
		else:
			l[a - 1] = l[a - 1] + b - 1
			l[a + 1] = l[a + 1] + l[a] - b
	except:
		l[a] = 0
	l[a] = 0
for i in l:
	print(i)


number_of_lines = int(input())
birds = list(map(int, input().split()))
number_of_tries = int(input())
for i in range(number_of_tries):
	shoot = input().split()
	(line, bird_index) = (int(shoot[0]) - 1, int(shoot[1]))
	(left, right) = (bird_index - 1, birds[line] - bird_index)
	if line > 0:
		birds[line - 1] += left
	if line < len(birds) - 1:
		birds[line + 1] += right
	birds[line] = 0
for b in birds:
	print(str(b))


n = int(input())
wires = [int(x) for x in input().split()]
tries = int(input())
for Try in range(tries):
	(i, j) = map(int, input().split())
	if i > 1:
		wires[i - 2] += j - 1
	if i < n:
		wires[i] += wires[i - 1] - j
	wires[i - 1] = 0
for i in wires:
	print(i)


n = int(input())
wires = list(map(int, input().split()))
m = int(input())
for i in range(m):
	(x, y) = map(int, input().split())
	x -= 1
	y -= 1
	E = y
	D = abs(y - (wires[x] - 1))
	wires[x] -= E + D + 1
	if x - 1 >= 0:
		wires[x - 1] += E
	if x + 1 <= n - 1:
		wires[x + 1] += D
for i in wires:
	print(i)


from sys import stdin
readlist = lambda : list(map(int, stdin.readline().split()))
readint = lambda : int(stdin.readline())
n = readint()
a = [0] + readlist() + [0]
for i in range(readint()):
	(x, y) = readlist()
	a[x - 1] += y - 1
	a[x + 1] += a[x] - y
	a[x] = 0
print('\n'.join(map(str, a[1:n + 1])))


n = int(input())
a = list(map(int, input().split()))
m = int(input())
for cas in range(m):
	(p, x) = map(int, input().split())
	p -= 1
	if p > 0:
		a[p - 1] += x - 1
	if p < n - 1:
		a[p + 1] += a[p] - x
	a[p] = 0
for x in a:
	print(x)


z = int(input())
v = list(map(int, input().split()))
s = int(input())
if s == 0:
	for i in range(len(v)):
		print(v[i])
elif z == 1:
	(x, y) = map(int, input().split())
	print(0)
else:
	for i in range(s):
		(x, y) = map(int, input().split())
		if x != 1 and x != z:
			v[x - 2] += y - 1
			v[x] += abs(v[x - 1] - y)
			v[x - 1] = 0
		elif x == 1:
			v[x] += abs(v[x - 1] - y)
			v[x - 1] = 0
		elif x == z:
			v[x - 2] += y - 1
			v[x - 1] = 0
	for i in range(len(v)):
		print(v[i])


n = int(input())
bi = [int(x) for x in input().split()]
m = int(input())
p = list()
for i in range(m):
	x = [int(x) for x in input().split()]
	p.append(x)
for i in p:
	k = i[1]
	w = i[0] - 1
	if w - 1 >= 0:
		bi[w - 1] = bi[w - 1] + (k - 1)
	if w + 1 < n:
		bi[w + 1] = bi[w + 1] + (bi[w] - k)
	bi[w] = 0
for i in bi:
	print(i)


import sys
input = sys.stdin.readline
n = int(input())
a = [0] + [int(x) for x in input().split()] + [0]
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	a[x + 1] += a[x] - y
	a[x - 1] += y - 1
	a[x] = 0
print('\n'.join(map(str, a[1:-1])))


def main():
	n_wires = int(input())
	n_birds = [int(_) for _ in input().split()]
	n_shots = int(input())
	for _ in range(n_shots):
		[x, y] = [int(_) for _ in input().split()]
		n_birds_before = n_birds[x - 1]
		birds_left = y - 1
		birds_right = n_birds_before - y
		if x > 1:
			n_birds[x - 2] += birds_left
		if x < n_wires:
			n_birds[x] += birds_right
		n_birds[x - 1] = 0
	for i in range(n_wires):
		print(n_birds[i])
main()


n = int(input())
m = list(map(int, input().split()))
x = int(input())
for i in range(x):
	(n1, n2) = map(int, input().split())
	if n == 1:
		print(0)
		break
	else:
		t = m[n1 - 1]
		m[n1 - 1] = 0
		r = t - n2
		l = t - r - 1
		if n1 == 1:
			m[n1] += r
		elif n1 == len(m):
			m[n1 - 2] += l
		else:
			m[n1] += r
			m[n1 - 2] += l
else:
	for i in m:
		print(i)


N = int(input())
A = list(map(int, input().split()))
M = int(input())
X = []
Y = []
for I in range(M):
	(x, y) = map(int, input().split())
	X.append(x - 1)
	Y.append(y)
for J in range(M):
	L = Y[J] - 1
	R = A[X[J]] - Y[J]
	C1 = X[J] - 1
	C2 = X[J] + 1
	if C1 != -1:
		A[C1] += L
	if C2 != N:
		A[C2] += R
	A[X[J]] = 0
for K in range(N):
	print(A[K])


input()
A = list(map(int, input().split()))
for i in range(int(input())):
	(w, b) = map(int, input().split())
	up = b - 1
	do = A[w - 1] - b
	A[w - 1] = 0
	if w - 2 >= 0:
		A[w - 2] += up
	if w < len(A):
		A[w] += do
for a in A:
	print(a)


n = int(input())
a = [int(i) for i in input().split()]
m = int(input())
x = [0] * m
y = [0] * m
for i in range(m):
	(x[i], y[i]) = map(int, input().split())
for (i, j) in zip(x, range(m)):
	if i - 1 - 1 >= 0:
		a[i - 2] += y[j] - 1
	if i < len(a):
		a[i] += a[i - 1] - y[j]
	a[i - 1] = 0
for i in range(len(a)):
	print(a[i])


n = int(input())
l = list(map(int, input().split()))
x = int(input())
if n == 1 and x == 1:
	print(0)
elif n == 1 and x == 0:
	print(l[0])
else:
	for i in range(x):
		(r, q) = map(int, input().split())
		if r == n:
			l[r - 2] = l[r - 2] + q - 1
		elif r != 1:
			l[r - 2] = l[r - 2] + q - 1
			l[r] = l[r] + abs(l[r - 1] - q)
		if r == 1:
			l[r] = l[r] + abs(l[r - 1] - q)
		l[r - 1] = 0
	for i in l:
		print(i)


wires = int(input())
birds = [0] + list(map(int, input().split())) + [0]
shots = int(input())
for i in range(shots):
	(x, y) = map(int, input().split())
	birds[x - 1] += y - 1
	birds[x + 1] += birds[x] - y
	birds[x] = 0
for i in range(1, wires + 1):
	print(birds[i])


n = int(input())
a = list(map(int, input().split()))
m = int(input())
b = []
for i in range(m):
	c = list(map(int, input().split()))
	b.append(c)
if n == 1 and m >= 1:
	print(0)
elif n == 1 and m == 0:
	print(a[0])
else:
	for i in range(m):
		if b[i][0] == 1:
			a[1] += a[0] - b[i][1]
			a[0] = 0
		elif b[i][0] == n:
			a[n - 2] += b[i][1] - 1
			a[n - 1] = 0
		else:
			c = b[i][0]
			a[c - 2] += b[i][1] - 1
			a[c] += a[c - 1] - b[i][1]
			a[c - 1] = 0
	for i in range(n):
		print(a[i])


n = int(input())
a = list(map(int, input().split()))
nShot = int(input())
s = [list(map(int, input().split())) for i in range(nShot)]
for i in s:
	if n > 1:
		if i[0] - 1 == 0:
			R = sum([1 for p in range(i[1], a[i[0] - 1])])
			a[i[0]] = a[i[0]] + R
			a[i[0] - 1] = 0
		elif i[0] == n:
			L = sum([1 for p in range(1, i[1])])
			a[i[0] - 2] = a[i[0] - 2] + L
			a[i[0] - 1] = 0
		else:
			L = sum([1 for p in range(1, i[1])])
			R = sum([1 for p in range(i[1], a[i[0] - 1])])
			a[i[0] - 2] = a[i[0] - 2] + L
			a[i[0]] = a[i[0]] + R
			a[i[0] - 1] = 0
	else:
		a[i[0] - 1] = 0
[print(j) for j in a]


a = int(input())
b = list(map(int, input().split()))
c = int(input())
while c != 0:
	(x, y) = map(int, input().split())
	if a == 1:
		b[x - 1] = 0
		break
	if x == 1:
		b[x] = b[x] + (b[x - 1] - y)
	elif x == a:
		b[x - 2] = b[x - 2] + (y - 1)
	else:
		b[x] = b[x] + (b[x - 1] - y)
		b[x - 2] = b[x - 2] + (y - 1)
	b[x - 1] = 0
	c -= 1
for i in b:
	print(i)


n = int(input())
a = list(map(int, input().split()))
m = int(input())
l = []
for i in range(m):
	(x, y) = map(int, input().split())
	l.append([x - 1, y])
for i in range(m):
	if l[i][0] == n - 1:
		a[l[i][0] - 1] = a[l[i][0] - 1] + (l[i][1] - 1)
		a[l[i][0]] = 0
	elif l[i][0] == 0:
		a[l[i][0] + 1] = a[l[i][0] + 1] + (a[l[i][0]] - l[i][1])
		a[l[i][0]] = 0
	else:
		a[l[i][0] + 1] = a[l[i][0] + 1] + (a[l[i][0]] - l[i][1])
		a[l[i][0] - 1] = a[l[i][0] - 1] + (l[i][1] - 1)
		a[l[i][0]] = 0
for i in range(len(a)):
	print(a[i])


n = int(input())
list1 = list(map(int, input().split()))
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	if a > 1 and a < n:
		if a - 1 >= 0 and a - 2 >= 0:
			list1[a - 2] += b - 1
			list1[a - 1] -= b - 1
			if list1[a - 1] - 1 > 0:
				list1[a] += list1[a - 1] - 1
			list1[a - 1] = 0
	elif a == 1:
		if a - 1 >= 0:
			list1[a - 1] -= b - 1
			if list1[a - 1] - 1 > 0:
				if a < n:
					list1[a] += list1[a - 1] - 1
			list1[a - 1] = 0
	elif a == n:
		if a - 2 >= 0 and a - 1 >= 0:
			list1[a - 2] += b - 1
			list1[a - 1] = 0
for i in range(n):
	print(list1[i])


w = int(input())
b = [int(x) for x in input().split(' ')]
s = int(input())
m = [[int(i) for i in input().split(' ')] for x in range(s)]
for i in m:
	if w == 1:
		b[0] = 0
	elif i[0] == 1:
		b[1] = b[1] + (b[0] - i[1])
		b[0] = 0
	elif i[0] == w:
		b[w - 2] = b[w - 2] + (i[1] - 1)
		b[w - 1] = 0
	else:
		b[i[0] - 2] = b[i[0] - 2] + (i[1] - 1)
		b[i[0]] = b[i[0]] + (b[i[0] - 1] - i[1])
		b[i[0] - 1] = 0
for i in b:
	print(i)


def birds(n):
	lst = [[1 for i in range(int(a))] for a in input().split()]
	for i in range(int(input())):
		indeces = [int(i) for i in input().split()]
		(lst_index, bird_index) = (indeces[0] - 1, indeces[1] - 1)
		if lst_index != 0:
			lst[lst_index - 1] += lst[lst_index][:bird_index]
		if lst_index != len(lst) - 1:
			lst[lst_index + 1] += lst[lst_index][bird_index + 1:]
		lst[lst_index] = []
	for i in lst:
		print(len(i))

def main():
	birds(int(input()))
main()


n = int(input())
wires = [int(x) for x in input().split()]
m = int(input())
for i in range(m):
	(x, y) = [int(z) for z in input().split()]
	if x == 1:
		if n == 1:
			wires[i] = 0
		else:
			wires[x] += wires[x - 1] - y
			wires[x - 1] = 0
	elif x == n:
		if y:
			wires[x - 2] += y - 1
			wires[x - 1] = 0
	else:
		wires[x] += wires[x - 1] - y
		if y:
			wires[x - 2] += y - 1
		wires[x - 1] = 0
for i in range(n):
	print(wires[i])


n = int(input())
birds = list(map(int, input().split()))
n = int(input())
for i in range(n):
	(index, bird_no) = map(int, input().split())
	index -= 1
	right = birds[index] - bird_no
	left = bird_no - 1
	birds[index] = 0
	if index - 1 >= 0:
		birds[index - 1] += left
	if index + 1 < len(birds):
		birds[index + 1] += right
for bird in birds:
	print(bird)


n = int(input())
mat = [0] + list(map(int, input().split())) + [0]
m = int(input())
for _ in range(m):
	(x, y) = map(int, input().split())
	mat[x - 1] += y - 1
	mat[x + 1] += mat[x] - y
	mat[x] = 0
for i in range(1, n + 1):
	print(mat[i])


def shot_one(initial_bird, shot_position):
	x = shot_position[0]
	y = shot_position[1]
	bird_at_x = initial_bird[x - 1]
	initial_bird[x - 1] = 0
	if x - 1 != 0:
		initial_bird[x - 2] += y - 1
	if x != len(initial_bird):
		initial_bird[x] += bird_at_x - y
	return initial_bird

def shot_all(initial_bird, shot_coordinate):
	for shot_position in shot_coordinate:
		intial_bird = shot_one(initial_bird, shot_position)
	return initial_bird
n = int(input())
initial_bird = input()
initial_bird = initial_bird.split(' ')
bird_wire = []
for bird in initial_bird:
	bird_wire.append(int(bird))
m = int(input())
shot_coordinate = []
for i in range(m):
	masukan = input()
	masukan = masukan.split(' ')
	shot_coordinate.append((int(masukan[0]), int(masukan[1])))
bird_wire = shot_all(bird_wire, shot_coordinate)
for bird in bird_wire:
	print(bird)


def shaass_and_oskols(arr, shots, b):
	for i in range(shots):
		x = b[i][0]
		y = b[i][1]
		if x - 2 >= 0:
			arr[x - 2] = arr[x - 2] + (y - 1)
		if x <= len(arr) - 1:
			arr[x] = arr[x] + (arr[x - 1] - y)
		arr[x - 1] = 0
	for i in range(len(arr)):
		print(arr[i])
n = int(input(''))
arr = list(map(int, input('').split()))
shots = int(input(''))
b = []
for i in range(shots):
	a = list(map(int, input('').split()))
	b.append(a)
shaass_and_oskols(arr, shots, b)


n = int(input())
a = list(map(int, input().split()))
t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	if x == n:
		pass
	else:
		a[x] += a[x - 1] - y
	if x == 1:
		pass
	else:
		a[x - 2] += y - 1
	a[x - 1] -= a[x - 1] - y + 1
	a[x - 1] -= y - 1
for i in a:
	print(i)


wire_n = int(input())
o_in_wire = list(map(int, input().split(' ')))
m = int(input())
while m:
	(wire, shoot) = map(int, input().split(' '))
	wire -= 1
	shoot -= 1
	os = o_in_wire[wire]
	up = len(list(range(0, os))[:shoot])
	down = len(list(range(0, os))[shoot + 1:])
	if wire != 0:
		o_in_wire[wire - 1] += up
	if wire != wire_n - 1:
		o_in_wire[wire + 1] += down
	o_in_wire[wire] = 0
	m -= 1
for o in o_in_wire:
	print(o)


quantiaPassaros = int(input())
passaros = list(map(int, input().split()))
vetorPassaros = list((0 for i in range(102)))
for i in range(1, quantiaPassaros + 1):
	vetorPassaros[i] = passaros[i - 1]
quantiaTiros = int(input())
for i in range(quantiaTiros):
	(linhaTiro, posicaoTiro) = map(int, input().split())
	vetorPassaros[linhaTiro - 1] += posicaoTiro - 1
	vetorPassaros[linhaTiro + 1] += vetorPassaros[linhaTiro] - posicaoTiro
	vetorPassaros[linhaTiro] = 0
for i in range(1, quantiaPassaros + 1):
	print(vetorPassaros[i])


def shaass_and_oskols(a, xy, n):
	for xy_i in xy:
		(x, y) = xy_i
		(i_l, i_r) = (x - 2, x)
		if i_l >= 0:
			a[i_l] += y - 1
		if i_r < n:
			a[i_r] += a[x - 1] - y
		a[x - 1] = 0
	return '\n'.join((str(a_i) for a_i in a))
n = int(input())
a = [int(a_i) for a_i in input().split()]
m = int(input())
xy = [[int(xy_i) for xy_i in input().split()] for _ in range(m)]
ans = shaass_and_oskols(a, xy, n)
print(ans)


n = int(input())
no_birds_on_wires = [int(i) for i in input().split()]
shot_on = []
m = int(input())
for i in range(m):
	shot_on = [int(i) for i in input().split()]
	if (shot_on[0] != 1) & (shot_on[0] != n):
		no_birds_on_wires[shot_on[0] - 2] += shot_on[1] - 1
		no_birds_on_wires[shot_on[0]] += no_birds_on_wires[shot_on[0] - 1] - shot_on[1]
		no_birds_on_wires[shot_on[0] - 1] = 0
	elif shot_on[0] == 1:
		if n != 1:
			no_birds_on_wires[shot_on[0]] += no_birds_on_wires[shot_on[0] - 1] - shot_on[1]
		no_birds_on_wires[shot_on[0] - 1] = 0
	elif shot_on[0] == n:
		if n != 1:
			no_birds_on_wires[shot_on[0] - 2] += shot_on[1] - 1
		no_birds_on_wires[shot_on[0] - 1] = 0
for i in range(n):
	print(no_birds_on_wires[i])


lines = int(input())
int_birds = list(map(lambda y: int(y), input().split()))
shots = int(input())
shot_detail = []
for i in range(0, shots):
	shot_detail.append(tuple(list(map(lambda y: int(y), input().split()))))
for i in range(0, shots):
	if shot_detail[i][0] - 2 < 0:
		pass
	else:
		int_birds[shot_detail[i][0] - 2] += shot_detail[i][1] - 1
	if shot_detail[i][0] >= lines:
		pass
	else:
		int_birds[shot_detail[i][0]] += int_birds[shot_detail[i][0] - 1] - shot_detail[i][1]
	int_birds[shot_detail[i][0] - 1] = 0
for i in range(0, len(int_birds)):
	print(int_birds[i])


n = int(input())
birds_on_lines = list(map(int, input().split()))
m = int(input())
for shot in range(1, m + 1):
	(line, killed) = map(int, input().split())
	if line > 1:
		birds_on_lines[abs(line - 2)] += killed - 1
	if line < n:
		birds_on_lines[line] += birds_on_lines[line - 1] - killed
	birds_on_lines[line - 1] = 0
for line in birds_on_lines:
	print(line)


num_wires = int(input())
lst = [int(i) for i in input().split()]
number_of_shots = int(input())
line_shotpos = []
for i in range(number_of_shots):
	line_shotpos.append([int(i) for i in input().split()])
for i in range(number_of_shots):
	current_line = line_shotpos[i][0]
	bird_shot_at = line_shotpos[i][1]
	bird_totheleft = bird_shot_at - 1
	bird_totheright = lst[current_line - 1] - bird_shot_at
	if current_line != 1:
		lst[current_line - 1 - 1] += bird_totheleft
	if current_line != num_wires:
		lst[current_line - 1 + 1] += bird_totheright
	lst[current_line - 1] = 0
for i in lst:
	print(i)


i = int(input())
l = list(map(int, input().split()))
for _ in range(int(input())):
	(n, k) = map(int, input().split())
	if n - 2 >= 0:
		l[n - 2] += k - 1
	if n < i:
		l[n] += l[n - 1] - k
	l[n - 1] = 0
for x in l:
	print(x)


n = int(input())
birds = list(map(int, input().split()))
s = int(input())
for x in range(s):
	(wire, pos) = map(int, input().split())
	actualWire = wire - 1
	if n == 1:
		birds[0] = 0
	elif actualWire != 0 and actualWire != len(birds) - 1:
		birds[actualWire + 1] += birds[actualWire] - pos
		birds[actualWire - 1] += pos - 1
		birds[actualWire] = 0
	elif actualWire == 0:
		birds[actualWire + 1] += birds[actualWire] - pos
		birds[actualWire] = 0
	else:
		birds[actualWire - 1] += pos - 1
		birds[actualWire] = 0
for y in birds:
	print(y)


n = int(input())
birds = list(map(int, input().split()))
m = int(input())
log = []
for i in range(m):
	log.append(list(map(int, input().split())))
for shot in log:
	wire = shot[0]
	left = shot[1]
	toLeft = left - 1
	toRight = birds[wire - 1] - toLeft - 1
	birds[wire - 1] = 0
	if wire > 1:
		birds[wire - 2] += toLeft
	if wire < len(birds):
		birds[wire] += toRight
for i in birds:
	print(i)


n = int(input())
birds = list(map(int, input().strip().split()))
m = int(input())
for _ in range(m):
	(x, y) = list(map(int, input().strip().split()))
	x -= 1
	if x == 0 and x == n - 1:
		birds[x] = 0
	elif x == 0:
		birds[x + 1] += birds[x] - y
	elif x == n - 1:
		birds[x - 1] += y - 1
	else:
		birds[x - 1] += y - 1
		birds[x + 1] += birds[x] - y
	birds[x] = 0
for v in birds:
	print(v)


def solution(a, n, xy, m):
	for (x, y) in xy:
		if x > 1:
			a[x - 2] += y - 1
		if x < n:
			a[x] += a[x - 1] - y
		a[x - 1] = 0
n = int(input())
a = list(map(int, input().split()))
m = int(input())
xy = []
for _ in range(m):
	xy.append(tuple(map(int, input().split())))
solution(a, n, xy, m)
for i in a:
	print(i)


n = int(input())
v = [int(x) for x in input().split()]
m = int(input())
for i in range(m):
	(r, c) = map(int, input().split())
	r -= 1
	left = c - 1
	right = v[r] - c
	v[r] = 0
	if r - 1 >= 0:
		v[r - 1] += left
	if r + 1 < n:
		v[r + 1] += right
for i in v:
	print(i)


n = int(input())
l = list(map(int, input().split()))
m = int(input())
if n != 1:
	while m:
		(x, y) = map(int, input().split())
		if x == 1:
			l[x] += l[x - 1] - y
		elif x == n:
			l[x - 2] += y - 1
		else:
			l[x] += l[x - 1] - y
			l[x - 2] += y - 1
		l[x - 1] = 0
		m -= 1
	for item in l:
		print(item)
elif m != 0:
	print(0)
else:
	print(*l, sep='')


n = int(input())
x = list(map(int, input().split()))
m = int(input())
for j in range(m):
	(a, b) = map(int, input().split())
	if a == 1:
		if n > 1:
			x[1] = x[1] + x[0] - b
		x[0] = 0
	elif a == n:
		if n > 1:
			x[a - 2] += b - 1
		x[a - 1] = 0
	else:
		x[a - 2] = x[a - 2] + b - 1
		x[a] = x[a] + x[a - 1] - b
		x[a - 1] = 0
for i in x:
	print(i)


n = int(input())
q = [int(x) for x in input().split()]
for i in range(int(input())):
	(a, b) = [int(x) for x in input().split()]
	if a - 2 >= 0:
		q[a - 2] += b - 1
	if a + 1 <= n:
		q[a] += q[a - 1] - b
	q[a - 1] = 0
for x in q:
	print(x)


input()
wires_num = input().split(' ')
wires = []
wires.append(0)
for wire in wires_num:
	wires.append(int(wire))
wires.append(0)
for i in range(0, int(input())):
	op = input().split(' ')
	w_n = int(op[0])
	o_n = int(op[1])
	c = wires[w_n]
	wires.pop(w_n)
	wires.insert(w_n, 0)
	a = wires[w_n - 1]
	wires.pop(w_n - 1)
	wires.insert(w_n - 1, a + o_n - 1)
	b = wires[w_n + 1]
	wires.pop(w_n + 1)
	wires.insert(w_n + 1, b + c - o_n)
wires.pop(0)
wires.pop(-1)
for wire in wires:
	print(wire)


n = int(input())
A = [int(a) for a in input().split(sep=' ')]
m = int(input())
for i in range(0, m):
	(x, y) = [int(a) for a in input().split(sep=' ')]
	x -= 1
	if x > 0:
		A[x - 1] += y - 1
	if x < len(A) - 1:
		A[x + 1] += A[x] - y
	A[x] = 0
for a in A:
	print(a)


n = int(input())
l = list(map(int, input().split()))
m = int(input())
for _ in range(m):
	(i, pos) = map(int, input().split())
	row = i - 1
	if row == 0:
		if n > 1:
			l[1] += l[0] - pos
		l[0] = 0
	elif row == n - 1:
		if n > 1:
			l[n - 2] += pos - 1
		l[n - 1] = 0
	elif n > 2:
		l[row - 1] += pos - 1
		l[row + 1] += l[row] - pos
		l[row] = 0
print('\n'.join(map(str, l)))


from sys import stdin
from fractions import Fraction
n = int(stdin.readline().strip())
birds = [int(x) for x in stdin.readline().strip().split(' ')]
m = int(stdin.readline().strip())
dead = []
for i in range(m):
	dead.append([int(x) for x in stdin.readline().strip().split(' ')])

def solution(birds, dead):
	for d in dead:
		x = d[0] - 1
		y = d[1]
		if x != 0:
			birds[x - 1] += y - 1
		if x != n - 1:
			birds[x + 1] += birds[x] - y
		birds[x] = 0
	return birds
s = solution(birds, dead)
for x in s:
	print(x)