(let ((tests (read))) (dotimes (i tests) (let ((n (read))) (if (= n 0) (format t "1 0 0~&") (multiple-value-bind (d m) (truncate (1- n) 26) (format t (cond ((< m 2) "~a 0 0~&") ((< m 10) "0 ~a 0~&") (t "0 0 ~a~&")) (expt 2 d)))))))