How to move the parent object to a child of one of its children?

I want a parent Game Object to parent itself to one of its children. How do I do this?

void Start()
{
Transform child = transform.GetChild(0);

        transform.DetachChildren();
        transform.SetParent(child);
    }