Made queue and matrix for euler81