Queen code
By @Truquyenlinhnhi