# CS1010X AY18/19 Special Term I Finals
a = [4, 3, 2, 1]
b = [1, 4, 3, 2]
c = [2, 1, 4, 3]
d = [3, 2, 1, 4]
a[0], a[1], a[2] = a, c, b
b[0], b[1], b[2] = a, b, c
c[0], c[1], c[2] = c, b, d
d[0], d[1], d[2] = c, d, a
print(a[0][1][0][2][1][2][2][2][3])