You're a chef and you love cooking with your spices, but recently you've taken a liking to organizing your spices based on how often you use them. But you have no time to be writing down when you used your spice last. Simply, you swap and move spices around, and this seems to do the trick.
But of course you're a chef and that means you have some cooks with you. You decide to tell them the simple rules of engagement with your spices.
If you recently used a spice, move it up one in the spice rack
If you didn't use any spices at all, e.g.
empty movement list, then the spice list is not affected.
You may put any spice into my spice holder, but if you use it, make sure to move it.
The list can contain anything. But because these are spices we are working with. It is preferred that you use names of spices.
Spices should be unique. Too many of the same spices spoil the broth... or however that saying goes
Normal code-golf rules apply.
Example of Oregano being used again and again.
pepper pepper pepper pepper oregano paprika paprika paprika oregano pepper salt salt oregano paprika paprika cumin oregano salt salt salt oregano cumin cumin cumin cumin
Input a list of spices, and a list of what spices got used, then output the final list.
[pepper, paprika, salt, cumin, oregano], [oregano, cumin, cumin, salt, salt, salt]
[salt, pepper, paprika, cumin, oregano]
How this looks
pepper pepper pepper pepper pepper pepper salt paprika paprika paprika paprika paprika salt pepper salt salt salt cumin salt paprika paprika cumin oregano cumin salt cumin cumin cumin oregano cumin oregano oregano oregano oregano oregano
[pepper, paprika, salt, cumin, oregano], [salt, salt, salt, salt, salt, salt, salt, salt, salt, salt, salt, salt, oregano]
[salt, pepper, paprika, oregano, cumin]