Card card = game.getCard(target.getFirstTarget());
if (card != null) {
cards.remove(card);
if (card.putOntoBattlefield(game, Zone.PICK, source.getSourceId(), source.getControllerId())) {
// It gains \"At the beginning of your end step, return this creature to its owner's hand.\"
Ability ability = new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), TargetController.YOU, null, false);
ContinuousEffect effect = new GainAbilityTargetEffect(ability, Duration.Custom);
effect.setTargetPointer(new FixedTarget(card.getId()));
game.addEffect(effect, source);
}
}