Printing lcs wa error

https://hack.codingblocks.com/contests/c/452/277

code https://ide.codingblocks.com/#/s/15024

it passes lots of my own sample cases but still not passes the test cases of the problem

approach:
using bottom up dp, created dp table
and then recurrsed the table from bottom right to get the lcs

You have to check for I-1 and j-1 characters of both strings respectively but you are Chet for ai and bj.
Fix this