treminate 8puzzle but parent printing not working