john    math        sciencepaul    math        sciencerosy    mathjill    sciencerob     math        sciencehary    mathDesired output:john    mathjohn    sciencepaul    mathpaul    sciencerosy    mathjill    sciencerob     mathrob     sciencehary    math
replace blank value with previous first column value using awk and sed
text processing;awk;sed