class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: I = None
        self.x: G = None
        self.u: J = None
        self.p: J = None
        self.v: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.p: H = None
        self.x: J = None
        self.r: H = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: J = None
        self.v: F = None
        self.o: J = None
        self.u: I = None
        self.z: A = None
        self.p: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: G = None
        self.w: J = None
        self.s: F = None
        self.q: I = None
        self.r: E = None
        self.v: E = None
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: G = None
        self.s: C = None
        self.r: H = None
        self.w: C = None
        self.z: H = None
        self.q: G = None
        self.p: G = None
        self.txt = txt

c = A("c")
j = B("j")
i = C("i")
a = D("a")
e = E("e")
n = F("n")
h = G("h")
b = H("b")
f = I("f")
k = J("k")

c.x = f
j.w = i
j.s = f
j.x = h
j.u = k
j.p = k
j.v = k
i.u = a
a.t = f
a.p = b
a.r = b
a.x = k
a.s = e
e.q = a
e.t = k
e.o = k
e.p = k
e.v = n
e.u = f
e.z = c
n.v = f
h.x = i
b.x = j
b.p = h
b.w = k
b.s = n
b.q = f
b.r = e
b.v = e
b.o = i
f.u = b
k.o = j
k.v = h
k.q = h
k.p = h
k.s = i
k.w = i
k.r = b
k.z = b
assert k.s.u.s.v.v.u.q.u.s.v.txt == "
class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: I = None
        self.x: G = None
        self.u: J = None
        self.p: J = None
        self.v: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.p: H = None
        self.x: J = None
        self.r: H = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: J = None
        self.v: F = None
        self.o: J = None
        self.u: I = None
        self.z: A = None
        self.p: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: G = None
        self.w: J = None
        self.s: F = None
        self.q: I = None
        self.r: E = None
        self.v: E = None
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: G = None
        self.s: C = None
        self.r: H = None
        self.w: C = None
        self.z: H = None
        self.q: G = None
        self.p: G = None
        self.txt = txt

c = A("c")
j = B("j")
i = C("i")
a = D("a")
e = E("e")
n = F("n")
h = G("h")
b = H("b")
f = I("f")
k = J("k")

c.x = f
j.w = i
j.s = f
j.x = h
j.u = k
j.p = k
j.v = k
i.u = a
a.t = f
a.p = b
a.r = b
a.x = k
a.s = e
e.q = a
e.t = k
e.o = k
e.p = k
e.v = n
e.u = f
e.z = c
n.v = f
h.x = i
b.x = j
b.p = h
b.w = k
b.s = n
b.q = f
b.r = e
b.v = e
b.o = i
f.u = b
k.o = j
k.v = h
k.q = h
k.p = h
k.s = i
k.w = i
k.r = b
k.z = b
assert k.s.u.s.v.v.u.q.u.s.v.txt == "f"