Buggy python submission (verdict: Runtime Error):
def solve():
   x = raw_input()
   y = raw_input()
   lenx = len(x)
   leny = len(y)
   
   z = [0 for k in range(b+1)]
   for i in range(lenx):
      a = x[i]
      b = z + []
      for j in range(leny):
         if a == y[i]:
               z[j+1] = b[j] + 1
         elif z[j+1] < z[j]:
               
   print max(zz)

n = input()
for i in xrange(n):
   solve()

Fixed submission:
def solve():
    x = raw_input()
    y = raw_input()
    a, b = len(x), len(y)
    x1 = [0 for k in range(b+1)]
    for i in xrange(a):
        c = x[i]
        x2 = x1+[]
        for j in xrange(b):
            if c == y[j]:
                x1[j+1] = x2[j] + 1
            elif x1[j+1] < x1[j]:
                x1[j+1] = x1[j]
    print max(x1)
  
n = input()
for i in xrange(n):
    solve()

Buggy python submission (verdict: Runtime Error):
def solve():
   x = raw_input()
   y = raw_input()
   lenx = len(x)
   leny = len(y)
   
   z = [0 for k in range(b+1)]
   for i in range(lenx):
      a = x[i]
      b = z + []
      for j in range(leny):
         if a == y[i]:
               z[j+1] = b[j] + 1
         elif z[j+1] < z[j]:
               
   print max(z)

n = input()
for i in xrange(n):
   solve()

Fixed submission:
def solve():
    x = raw_input()
    y = raw_input()
    a, b = len(x), len(y)
    x1 = [0 for k in range(b+1)]
    for i in xrange(a):
        c = x[i]
        x2 = x1+[]
        for j in xrange(b):
            if c == y[j]:
                x1[j+1] = x2[j] + 1
            elif x1[j+1] < x1[j]:
                x1[j+1] = x1[j]
    print max(x1)
  
n = input()
for i in xrange(n):
    solve()

Buggy python submission (verdict: Runtime Error):
def solve():
   x = raw_input()
   y = raw_input()
   lenx = len(x)
   leny = len(y)
   
   z = [0 for k in range(b+1)]
   for i in range(lenx):
      a = x[i]
      b = z + []
      for j in xrange(leny):
         if a == y[i]:
               z[j+1] = b[j] + 1
         elif z[j+1] < z[j]:
               z[j+1] = z[j]
               
   print max(z)

n = input()
for i in xrange(n):
   solve()

Fixed submission:
def solve():
    x = raw_input()
    y = raw_input()
    a, b = len(x), len(y)
    x1 = [0 for k in range(b+1)]
    for i in xrange(a):
        c = x[i]
        x2 = x1+[]
        for j in xrange(b):
            if c == y[j]:
                x1[j+1] = x2[j] + 1
            elif x1[j+1] < x1[j]:
                x1[j+1] = x1[j]
    print max(x1)
  
n = input()
for i in xrange(n):
    solve()

Buggy python submission (verdict: Runtime Error):
def solve():
   x = raw_input()
   y = raw_input()
   lenx = len(x)
   leny = len(y)
   
   z = [0 for k in range(lenx)]
   for i in range(lenx):
      a = x[i]
      b = z + []
      for j in xrange(leny):
         if a == y[i]:
               z[j+1] = b[j] + 1
         elif z[j+1] < z[j]:
               z[j+1] = z[j]
               
   print max(z)

n = input()
for i in xrange(n):
   solve()

Fixed submission:
def solve():
    x = raw_input()
    y = raw_input()
    a, b = len(x), len(y)
    x1 = [0 for k in range(b+1)]
    for i in xrange(a):
        c = x[i]
        x2 = x1+[]
        for j in xrange(b):
            if c == y[j]:
                x1[j+1] = x2[j] + 1
            elif x1[j+1] < x1[j]:
                x1[j+1] = x1[j]
    print max(x1)
  
n = input()
for i in xrange(n):
    solve()

Buggy python submission (verdict: Runtime Error):
def solve():
   x = raw_input()
   y = raw_input()
   lenx = len(x)
   leny = len(y)
   
   z = [0 for k in range(lenx)]
   for i in range(lenx):
      a = x[i]
      b = z + []
      for j in range(leny):
         if a == y[i]:
               z[j+1] = b[j] + 1
         elif z[j+1] < z[j]:
               z[j+1] = z[j]
               
   print max(z)

n = input()
for i in range(n):
   solve()

Fixed submission:
def solve():
    x = raw_input()
    y = raw_input()
    a, b = len(x), len(y)
    x1 = [0 for k in range(b+1)]
    for i in xrange(a):
        c = x[i]
        x2 = x1+[]
        for j in xrange(b):
            if c == y[j]:
                x1[j+1] = x2[j] + 1
            elif x1[j+1] < x1[j]:
                x1[j+1] = x1[j]
    print max(x1)
  
n = input()
for i in xrange(n):
    solve()

Buggy python submission (verdict: Runtime Error):
def solve():
   x = raw_input()
   y = raw_input()
   lenx = len(x)
   leny = len(y)
   
   x1 = [0 for k in range(lenx)]
   for i in range(lenx):
      a = x[i]
      x2 = x1 + []
      for j in range(leny):
         if a == y[i]:
               x1[j+1] = x2[j] + 1
         elif x1[j+1] < x1[j]:
               x1[j+1] = x1[j]
               
   print max(x1)

n = input()
for i in range(n):
   solve()

Fixed submission:
def solve():
    x = raw_input()
    y = raw_input()
    a, b = len(x), len(y)
    x1 = [0 for k in range(b+1)]
    for i in xrange(a):
        c = x[i]
        x2 = x1+[]
        for j in xrange(b):
            if c == y[j]:
                x1[j+1] = x2[j] + 1
            elif x1[j+1] < x1[j]:
                x1[j+1] = x1[j]
    print max(x1)
  
n = input()
for i in xrange(n):
    solve()

Buggy python submission (verdict: Runtime Error):
def solve():
  x = raw_input()
  y = raw_input()
  a, b = len(x), len(y)
  
  dsp1 = [0 for i in xrange(b+1)]
  for i in xrange(a):
    dsp2 = dsp1+[]
    for j in xrange(b):
      if x[i] == y[j]:
      dsp1[j+1] = dsp2[j] + 1
    elif dsp1[j+1] < dsp1[j]:
      dsp1[j+1] = dsp1[j]
  print max(dsp1)
   
  n = input()
  for a in xrange(n):
    solve()

Fixed submission:
def solve():
    x = raw_input()
    y = raw_input()
    a, b = len(x), len(y)
    x1 = [0 for k in range(b+1)]
    for i in xrange(a):
        c = x[i]
        x2 = x1+[]
        for j in xrange(b):
            if c == y[j]:
                x1[j+1] = x2[j] + 1
            elif x1[j+1] < x1[j]:
                x1[j+1] = x1[j]
    print max(x1)
  
n = input()
for i in xrange(n):
    solve()