• + 0 comments

    You can also take in the entire buffer at once with

    from sys import stdin
    x,y,z,n = map(int, stdin.readlines())