adding my solution tsh.c