Move File to Subfolder Based on Name

Here is what I am attempting to do with Hazel:
I have a folder called Master, which contains subfolders Slave 1, Slave 2, Slave 3, Slave 4, Slave 5, and Slave 6. When a file is placed in Master, I want it to be moved to one of the Slave folder IFF it contains matching text in its name (e.g., if the file is named "Slave 1 scan.pdf" I want it moved to the Slave 1 folder).
Now, getting a list against which to compare the file names is trivial (e.g., simply using "cd ~/Master/ ls > master-list.txt" works just fine to generate the list). The issue lies in getting the names of files added to Master automatically compared against the items on that list and, if appropriate, moved.
n.b., the Master folder will have more Slave folders added over time, so any solution cannot hard code the subfolder names.
Any help will be greatly appreciated.
I have a folder called Master, which contains subfolders Slave 1, Slave 2, Slave 3, Slave 4, Slave 5, and Slave 6. When a file is placed in Master, I want it to be moved to one of the Slave folder IFF it contains matching text in its name (e.g., if the file is named "Slave 1 scan.pdf" I want it moved to the Slave 1 folder).
Now, getting a list against which to compare the file names is trivial (e.g., simply using "cd ~/Master/ ls > master-list.txt" works just fine to generate the list). The issue lies in getting the names of files added to Master automatically compared against the items on that list and, if appropriate, moved.
n.b., the Master folder will have more Slave folders added over time, so any solution cannot hard code the subfolder names.
Any help will be greatly appreciated.