class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.q: G = None
        self.s: D = None
        self.z: I = None
        self.y: I = None
        self.w: G = None
        self.r: D = None
        self.v: J = None
        self.t: D = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: A = None
        self.p: F = None
        self.z: D = None
        self.s: C = None
        self.o: H = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: B = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: J = None
        self.x: F = None
        self.v: B = None
        self.q: F = None
        self.o: E = None
        self.w: B = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: J = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: D = None
        self.q: G = None
        self.s: B = None
        self.t: G = None
        self.p: C = None
        self.y: C = None
        self.r: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: H = None
        self.p: G = None
        self.s: B = None
        self.t: C = None
        self.u: D = None
        self.z: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.q: G = None
        self.s: D = None
        self.z: I = None
        self.y: I = None
        self.w: G = None
        self.r: D = None
        self.v: J = None
        self.t: D = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: A = None
        self.p: F = None
        self.z: D = None
        self.s: C = None
        self.o: H = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: B = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: J = None
        self.x: F = None
        self.v: B = None
        self.q: F = None
        self.o: E = None
        self.w: B = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: J = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: D = None
        self.q: G = None
        self.s: B = None
        self.t: G = None
        self.p: C = None
        self.y: C = None
        self.r: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: H = None
        self.p: G = None
        self.s: B = None
        self.t: C = None
        self.u: D = None
        self.z: I = None
        self.txt = txt

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

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