I don’t know which language you use to get the input but for example with Python you can just do that:
print("your access key here")
_, h = map(int, input().split())
M = []
for _ in range(h):
M.append(list(map(int, input().split())))
print(*M, sep=",")
Then you can just copy/paste the input in [ ] and you get a nice matrix to work with.