A shop sells T-shirts of four sizes, XS, S, M and L. 8 size XS T-shirts and half of size S T-shirts were sold yesterday. The next day, 12 size M T-shirts and twice the number of size L T-shirts were restocked. At the end of that day, there were the same number of T-shirts of all sizes. If there were 122 T-shirts at first, how many T-shirts of each size were left in the end?