When you cast this spell, reveal the top X cards of your library. You may put a nonland permanent card with mana value X or less from among them onto the battlefield. Then shuffle the rest into your library.
Genesis Hydra enters the battlefield with X +1/+1 counters on it.
A nonland permanent card is an artifact, creature, enchantment, or planeswalker card.
Genesis Hydra's first ability will resolve before Genesis Hydra does. Notably, if you put an Aura card onto the battlefield this way, it can't enchant Genesis Hydra.
If a card in a player's library has {X} in its mana cost, X is considered to be 0.
If you have fewer than X cards in your library, you reveal all of them.
If you put an Aura onto the battlefield this way, you choose what it enchants as it enters the battlefield. This doesn't target any permanent or player, but it must be able to enchant that permanent or player. For example, you could put a green Aura onto the battlefield enchanting a creature with hexproof controlled by an opponent, but not one with protection from green.
If “the rest” is zero cards, either because X was 0 or because X was 1 and that card was put onto the battlefield, the library is still shuffled.