Transpose of a matrix using Python 3.8
You're converting the matrix elements to int and then back to string without doing anything with the ints, so that's just wasteful.
Anyway, the usual way to transpose is zip. Demo including mock input:
input = iter('''3
1 2 3
4 5 6
7 8 9'''.splitlines()).__next__

matrix = [input().split() for _ in range(int(input()))]

for column in zip(*matrix):
    print(*column)

Output:
1 4 7
2 5 8
3 6 9