After returned from forest, Alyona started reading a book. She noticed strings *s* and *t*, lengths of which are *n* and *m* respectively. As usual, reading bored Alyona and she decided to pay her attention to strings *s* and *t*, which she considered very similar.

Alyona has her favourite positive integer *k* and because she is too small, *k* does not exceed 10. The girl wants now to choose *k* disjoint non-empty substrings of string *s* such that these strings appear as disjoint substrings of string *t* and in the same order as they do in string *s*. She is also interested in that their length is maximum possible among all variants.

Formally, Alyona wants to find a sequence of *k* non-empty strings *p*<sub class="lower-index">1</sub>, *p*<sub class="lower-index">2</sub>, *p*<sub class="lower-index">3</sub>, ..., *p*<sub class="lower-index">*k*</sub> satisfying following conditions:
 -  *s* can be represented as concatenation *a*<sub class="lower-index">1</sub>*p*<sub class="lower-index">1</sub>*a*<sub class="lower-index">2</sub>*p*<sub class="lower-index">2</sub>... *a*<sub class="lower-index">*k*</sub>*p*<sub class="lower-index">*k*</sub>*a*<sub class="lower-index">*k* + 1</sub>, where *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*k* + 1</sub> is a sequence of arbitrary strings (some of them may be possibly empty); -  *t* can be represented as concatenation *b*<sub class="lower-index">1</sub>*p*<sub class="lower-index">1</sub>*b*<sub class="lower-index">2</sub>*p*<sub class="lower-index">2</sub>... *b*<sub class="lower-index">*k*</sub>*p*<sub class="lower-index">*k*</sub>*b*<sub class="lower-index">*k* + 1</sub>, where *b*<sub class="lower-index">1</sub>, *b*<sub class="lower-index">2</sub>, ..., *b*<sub class="lower-index">*k* + 1</sub> is a sequence of arbitrary strings (some of them may be possibly empty); -  sum of the lengths of strings in sequence is maximum possible. 
Please help Alyona solve this complicated problem and find at least the sum of the lengths of the strings in a desired sequence.

A substring of a string is a subsequence of consecutive characters of the string.
In the first line of the input three integers *n*, *m*, *k* (1 ≤ *n*, *m* ≤ 1000, 1 ≤ *k* ≤ 10) are given — the length of the string *s*, the length of the string *t* and Alyona's favourite number respectively.

The second line of the input contains string *s*, consisting of lowercase English letters.

The third line of the input contains string *t*, consisting of lowercase English letters.
The following image describes the answer for the second sample case:
3 2 2
abc
ab
2
9 12 4
bbaaababb
abbbabbaaaba
7
11 11 4
aaababbabbb
bbbaaaabaab
7
15 9 4
ababaaabbaaaabb
bbaababbb
8
2 7 1
bb
bbaabaa
2
13 4 3
abbaababaaaab
aaab
4
2 3 2
ab
aab
2
13 9 1
oaflomxegekyv
bgwwqizfo
1
5 9 1
babcb
abbcbaacb
3
8 12 2
bccbbaac
abccbcaccaaa
6
11 2 2
bcbcbbabaaa
ca
2
12 7 6
aabbccaccbcb
cabcccc
6
15 10 1
abbccbaaaabaabb
bbaabaacca
5
127 266 4
baaabaababaaabbabbbbaababbbabaabbaaaaaabbababaabababaaaabaaaabbabaaababaabaabbbbbaabaabbbbbaaabbaabaabbbbaaaaababaaabaaabbaabaa
abbababaaaabbbabbbbaabbbbaaabbabbaaaabaabaabababbbabbaabbabaaaaaabbbbbbbbaaabaababbbabababbabaaaababaabaaabaaabaaabaabbbabbbbabbaaabaaaaaabbaaabababbababaaaaaabaaabbbabbbabbbbabaabbabababbabbabbaababbbabbbbabbabaabbbaababbaaababaabbabbaaabbabbaabaabaabbaabbabaababba
41
132 206 2
ababaababaaaabbaabbaabaababbaaabbabababbbbabbbaaaaaaabbabaaaabbabbbbbbbbbabbbbaabbaaabaaaabbabaaaababbbbaaaaabababbbbabababbbabbabab
abbbababbbaaababaaaababbbaababaaababbbbbbaaabbbabbbaabbbbabbbababbaaabbaaabaabababbaabbbbbaabaabaaababababaaaababbabaaaabbabaaabbbbabbbbaabbbbaaaabbabbbaababbbbaabbbbbabaabbababbaaabaabbabbbaabbabbbaabbaaab
26
290 182 2
bababbbabaabbbababbaaaabbbabbababbbbbbabbbaaaaabaaabbaabbbaaabaabaaaabbbaaabbaabbbbbbbbbbabbabbabaaaaaaaabaaaabababaabbabaabaaaaababaabbbbbbabbabbbbabaababbabbaaabbbbbaaabbbbaaababaabbbbababbbabbababbabbabbbaaabaaabbbbaabaaaaabbaabbbabbbbbabbbaaaabbaaababbaabbbbbbbbbbabaaabbaaabaababbbbaaa
babbaababaaaaaaabbaabbabaaaaaaaabbabaabbbaabaababbaaaababaaaabaabbababbabaaabbbaaabaabababbbbababaaabbbaababbbbaabbabbaabaaaaabaaabbbbbbabaabbababbbaabbaaaaabaaaabaaabaaaabbbaabaabab
25
279 89 9
bbbbaabbbbabaaaabbbababbaabbaabaaabababaabbaaaaabaababbbaababaaaaaabaababababbaaaababaaaabaaaaabaaaaaababbabaaababaaabbbabaaabaaabbbaabbaabaababbaaaaabaaabbabababababbaabbabbbaaababbbabbaaabaaabaaababaaabbaaaabababbabbabaabaabbbabbbabbbaababbabaaabaabbaabaabaaaaaaaabbbaabbbbabba
abaaaabbabbbbaabaaaabbbbbbbbbbaaababaabaabbaaabbaabababababbbabaaabaaababbbbbbabbaabbbaba
71
421 53 2
baaaaaabaaababaaaabbabaaabaabaaaabaabbaaababababbbbbabaaaaabbabbbaabbabbbbabaabbbababbbbabaaaababaabaabbbbaabaaaabbbaaaabababbbabbbbaabbabbabbbaabaaabbbabbabbababaaaaabbbabbbbbabbaaababbaababbbbbaaaabaabbabaaababbaabaaaaabbbbaabbbbaabaabbabbaabbaababbbaabaaaaabaabbaaabbababaaaabbabbbaaaabbbaabaabbaababababababaabbaaaabababaabaabaabbbaababbbaaaabaaababaabbabbabbaaaaaaaaaabbbbbabbaabbaabbabbbbbbbaabaabbaaaaabbbabbbbbbab
aababaaabbaaaabaaabbaabbabbbaaabbbababbbbbbaababbbbaa
22
274 102 7
bccabbbcbcababaacacaccbbcabbccbbacabccbaacabacacbcacaccaabacacccabbcccccabacbacbcaacacacbccaaacccaacacbbbcccccccbcaaacbcacaccbccacccacbbbbbbaabcbbbbbacbcacacaacbbbcbcbbaacacbaabcbbbaccbcccbbaacccabaabbcccccacbccbccbacbacbbbaccbabcbabbcbbccabaacccbaccaccaaaacacabcaacbabcabbc
abbcabbabacaccacaaaabcacbbcbbaccccbcccacaacabacabccbbbbaaaaccbbccaabcabbacbabbcabbbcaccaccaabbbcabcacb
44
120 362 6
caaccbbbabbbcbaacbaccacaaccacaaababccaccaabaccacccbbaaaaababbccbbacccaacabacbaaacabbacbabcccbccbcbbcaabaaabaabcccaabacbb
abcbbaaccbbcabbcbbcacbabaacbaaacabcbabcabbabccbcaaacaccaaabbcbaacccccbcabacaacabbbcabaabcbbccabacbaaaacbbbbbccabccccbababcbacbbbcbbaabcaabcacbaaaaaccbaabbabacbcbbbaabbbcabcaacbcccbcbbacababbcaababcbbbbbbcbbaaaababacabcbbcbbaccccbcacccabbbabccabcabacccbbbcaccaccaacacaabacaabccccaabccccaabaccbabcaabbcbbccccbbabccbbccbaacaccabbacacabbacccbbaaacaabacccbcbacbcbcaca
43
103 54 5
bccabcbcabcbacbbacccbaccacacccacaaabbbabaccbcbcacbaaccaccaacabaaccbbbabccbacbcbaccbcabbbaacaabbcbbbcaab
babbccbcbcbbbbcabcbbccbabbbbcacbcbbbaccbbccbacaacaaaca
27
14 14 1
geoskjkdvmxlnu
faqyereihjimnu
2
8 8 3
abbbcccd
ayyycccz
4
import os
import sys
from io import BytesIO, IOBase
nmbr = lambda: int(input())
lst = lambda: list(map(int, input().split()))
def main():
    NI = float('-inf')

    def fn(p1, p2, rem, taken_prev):
        if rem <= 0 and taken_prev == 0: return 0
        if p1 == n1 or p2 == n2: return 0
        if (p1, p2, rem, taken_prev) in dp: return dp[p1, p2, rem, taken_prev]
        ans = max(fn(p1 + 1, p2, rem, 0), fn(p1, p2 + 1, rem, 0))
        if s1[p1] == s2[p2]:
            if taken_prev:
                ans = max(ans, 1 + fn(p1 + 1, p2 + 1, rem - 1, 1), 1 + fn(p1 + 1, p2 + 1, rem, 1))
            else:
                ans = max(ans, 1 + fn(p1 + 1, p2 + 1, rem - 1, 1))
        dp[p1, p2, rem, taken_prev] = ans
        return ans

    for _ in range(1):  # nmbr()):
        n1, n2, k = lst()
        s1 = input()
        s2 = input()
        dp = {}
        if s1[0] == s2[0]:
            ans = max(fn(1, 0, k, 0), fn(0, 1, k, 0), 1 + fn(1, 1, k - 1, 1))
            print(ans)
        else:
            print(fn(0, 0, k, 0))

        # ans=ans if ans != PI else -1
        # sys.stdout.write(str(ans)+'\n')
BUFSIZE = 8192

class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

if __name__ == "__main__":
    for t in range(1):main()#int(input())):