Exile all cards from target player’s graveyard other than basic land cards. For each card exiled this way, search that player’s library for all cards with the same name as that card and exile them. Then that player shuffles.
While you’re searching the player’s library, you don’t have to find all the cards with the same name as an exiled card if you don’t want to. You can leave any number of them in that player’s library.
Random a card of Magic: The Gathering (MTG), but you can also roll the D20 dice, random a Planeswalker, have fun with the random rules and more.