{"code":"soanhca","name":"Tìm số anh cả","description":"Cho số nguyên dương $n$. Gọi $S$ là tập hợp tất cả các số nguyên dương được tạo thành từ các chữ số của số nguyên $n$. Số **\"anh cả\"** được định nghĩa là số lớn nhất trong tập $S$\r\n\r\n**Yêu cầu:** Cho số nguyên dương $n(0\\le n\\le 10^{100})$. Hãy in ra số **\"anh cả\"** cần tìm.\r\n\r\n<h4>Input</h4>\r\n\r\n- Dòng thứ nhất chứa số $t(1\\le t\\le 20)$ - Thể hiện số testcase\r\n\r\n- $t$ dòng tiếp theo, mỗi dòng chứa số nguyên dương $n(0\\le n\\le 10^{100})$\r\n\r\n<h4>Output</h4>\r\n\r\n- Ứng với mỗi testcase, in ra đáp án cần tìm.\r\n  \r\n<h4>Example</h4>\r\n\r\n!!! question \"Test 1\"\r\n\r\n    ???+ \"Input\"\r\n\r\n        ```sample\r\n        2\r\n        1254\r\n        3225\r\n        ```\r\n\r\n    ???+ success \"Output\"\r\n\r\n        ```sample\r\n        5421\r\n        5322\r\n        ```","points":120.0,"partial":false,"time_limit":1.0,"memory_limit":262144,"short_circuit":false,"allowed_languages":[3,4,34,36,37,5,6,11,12,14,28,2,38,39,9,18,17,29,23,27,35,25,26,10,7,19,32,1,8,15,16,24,20,33,13,41,21,40],"is_public":true,"is_manually_managed":false,"permissions":{"can_edit":false}}