class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: F = None
        self.s: C = None
        self.r: D = None
        self.o: B = None
        self.x: G = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: C = None
        self.o: F = None
        self.p: C = None
        self.z: A = None
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: E = None
        self.t: F = None
        self.p: F = None
        self.z: E = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: B = None
        self.p: D = None
        self.y: F = None
        self.z: E = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

f = A("f")
j = B("j")
a = C("a")
k = D("k")
b = E("b")
g = F("g")
h = G("h")
m = F("m")
i = A("i")
n = E("n")

f.t = j
f.o = j
f.z = j
f.q = g
f.s = a
f.r = k
f.x = h
j.s = b
j.y = b
j.w = a
j.p = a
j.o = g
j.z = f
a.r = k
a.t = h
a.x = f
k.o = h
k.r = b
k.z = b
k.t = g
k.p = m
k.s = a
b.r = h
b.t = a
g.x = h
g.v = j
g.p = k
g.t = k
g.y = m
g.z = b
h.z = g
m.x = h
m.v = j
m.p = k
m.t = k
m.y = g
m.z = n
i.t = j
i.o = j
i.z = j
i.q = g
i.s = a
i.r = k
i.x = h
n.r = h
n.t = a
assert j.z.o.w.t.z.z.r.z.z.r.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: F = None
        self.s: C = None
        self.r: D = None
        self.o: B = None
        self.x: G = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: C = None
        self.o: F = None
        self.p: C = None
        self.z: A = None
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: E = None
        self.t: F = None
        self.p: F = None
        self.z: E = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: B = None
        self.p: D = None
        self.y: F = None
        self.z: E = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

f = A("f")
j = B("j")
a = C("a")
k = D("k")
b = E("b")
g = F("g")
h = G("h")
m = F("m")
i = A("i")
n = E("n")

f.t = j
f.o = j
f.z = j
f.q = g
f.s = a
f.r = k
f.x = h
j.s = b
j.y = b
j.w = a
j.p = a
j.o = g
j.z = f
a.r = k
a.t = h
a.x = f
k.o = h
k.r = b
k.z = b
k.t = g
k.p = m
k.s = a
b.r = h
b.t = a
g.x = h
g.v = j
g.p = k
g.t = k
g.y = m
g.z = b
h.z = g
m.x = h
m.v = j
m.p = k
m.t = k
m.y = g
m.z = n
i.t = j
i.o = j
i.z = j
i.q = g
i.s = a
i.r = k
i.x = h
n.r = h
n.t = a
assert j.z.o.w.t.z.z.r.z.z.r.txt == "h"