Direct and inverse problem for the parabolic equation with initial value and time-dependent boundaries