new_list = [] for n in range(3): list1 = input().split() new_list += [[int(num) for num in list1]] def ab(new_list): list2 = [] list3 = [] list4 = [] row = 0 for n in range(3): for i in new_list: list2 += [i[n]] list3 += [new_list[0][0]] + [new_list[1][1]] + [new_list[2][2]] + [new_list[0][2]] + [new_list[1][1]] +[new_list[2][0]] return new_list print(ab(new_list))