output_description: Print one longest string that is a subsequence of both s and t. If there are
  multiple such strings, any of them will be accepted.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      s
      t
attempt: import java.util.*;
  public class Main{
      public static void main(String args[]){
          Scanner in = new Scanner(System.in);
          String s = in.next();
          String t = in.next();
          int n = s.length();
          int m = t.length();
          String dp[][] = new String[n+1][m+1];
          in.close();
          for(int i=0;i<=n;i++){
              dp[i][0] = "";
          }
          for(int j=0;j<=m;j++){
              dp[0][j] = "";
          }
          for(int i=0;i<n;i++){
              for(int j=0;j<m;j++){
                  if (s.charAt(i) == t.charAt(j)){
                      dp[i+1][j+1] = dp[i][j]+s.charAt(i);
                  }
                  else{
                      if (dp[i][j+1].length() >= dp[i+1][j].length()){
                          dp[i+1][j+1] = dp[i][j+1];
                      }
                      else{
                          dp[i+1][j+1] = dp[i+1][j];
                      }
                  }
              }
          }
          System.out.println(dp[n][m]);
      }
  }
problem_description: Statement
  
  You are given strings s and t. Find one longest string that is a subsequence
  of both s and t.
samples: [{"input": "axyb\n    abyxb", "output": "axb\n    \n\nThe answer is `axb` or `ayb`; either will be accepted.\n\n* * *"}, {"input": "aa\n    xayaz", "output": "aa\n    \n\n* * *"}, {"input": "a\n    z", "output": "The answer is `` (an empty string).\n\n* * *"}, {"input": "abracadabra\n    avadakedavra", "output": "aaadara"}]