Output Required a,2 a,2 b,f b,f c,4 c,4 s ,s w ,w