Ion beam induced depth profile modification of H, D and He implanted in Be, C and Si