the 2-dimensional array on python is bad so I use java instead