How to make parent for my prefabs using script?

I hv 10 cards prefabs and i want to intantiate all of them in scene under a group.. Deck is the parent(i want it to be), and card shud be children...so when i move my deck card will be moved ...so the problem is when i use intantiate every card is coming on each other and all mixed up they r now children but all mixed up...

or other way all card are on scene on the right position while game but they do not hv parent (deck)... is there any way that i can put them in deck while gameplay using scrip... (part of scripting)

transform.localPosition.z=height
clone=Instantiate(card, transform.position, transform.rotation)
cloned=clone.transform
cloned.parent = deck
height = height + 0.002

The question is a little unclear, but I notice you're assigning 'height' to 'localPosition', but then using 'position' when you create the object. If all the cards are being instantiated at exactly the same position, that might be the reason.