Answer :
go through by this step, i hope u got ur answer friend.
start
input a,b,c
m<-a
if b < m then m<-b
if c < m then m<-c
output m
end
start
input a,b,c
m<-a
if b < m then m<-b
if c < m then m<-c
output m
end
start
input d,e,f
m<-d
if b < m then m<-e
if c < m then m<-f
output a
end
input d,e,f
m<-d
if b < m then m<-e
if c < m then m<-f
output a
end