| 2024 ICPC ShaanXi Provincial Contest |
|---|
| Finished |
chmod is a command used to change file or directory permissions. It is one of the commonly used commands in Linux and other Unix-like operating systems. The chmod command allows users to set different permissions for files or directories to control who can read, write, or execute these files.
In a Linux system, each file or directory has permissions associated with it, and these permissions determine who can perform what operations on the file. Users are divided into three categories: owner, group, and others. Each type of user has three permissions: read (r), write (w) and execute (x). These $$$9$$$ permissions can be specified separately. We call 'permission string' a string of length $$$9$$$, which corresponds to the $$$9$$$ permissions mentioned above in order. If you have this permission, it is the corresponding one in r, w, x, otherwise -.
For example, 'permission string' rwxr-x--x indicates that the file has full permissions for the owner, only read and execute permissions for users in the group to which it belongs, and only execution permissions for others.
When using the chmod command, you can provide a pattern string to modify permissions. In this question, we only consider a pattern string with a length of $$$3$$$ consisting of numbers no greater than $$$7$$$. The three numbers represent the owner, the group and others from left to right. For each number, the lowest three binary bits from high to low indicate whether the user has read (r), write (w) and execute (x) permissions.
For example: After executing chmod 760 file.txt, the 'permission string' of the file is rwxrw----.
Given a number of legal pattern strings, each time you read in a pattern string, you need to output the 'permission string' of the modified file.
The first line contains a positive integer $$$T$$$ ($$$1 \le T \le 100$$$), representing the number of data groups.
The next $$$T$$$ lines contain one chmod pattern string per line.
There are $$$T$$$ lines in total, representing the 'permission string' corresponding to the pattern string.
3356114514
-wxr-xrw- --x--xr-- r-x--xr--
| Name |
|---|


