Moving Files Into Their Original Folders Overwriting Them

Hello guys,
I want to setup a folder action that gets the files I put into it and moves, overwriting them, into subfolders that contains the same file name.

I put into the Root folder “PARENT” the file named “xxx”. The same file “xxx” is contained into a randomly named subfolder “13735”. I want automator to find it and move the file “xxx” into the corresponding folder, overwriting it.

It may be simple, but I’m toying around since hours without getting it done. Can someone help me please?