class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: C = None
        self.p: E = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: E = None
        self.t: H = None
        self.z: E = None
        self.u: C = None
        self.o: H = None
        self.p: D = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: B = None
        self.q: H = None
        self.u: A = None
        self.o: A = None
        self.x: H = None
        self.z: H = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: E = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: C = None
        self.o: A = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: B = None
        self.t: C = None
        self.s: C = None
        self.r: C = None
        self.w: E = None
        self.o: A = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: E = None
        self.t: H = None
        self.z: E = None
        self.u: C = None
        self.o: H = None
        self.p: D = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: B = None
        self.q: H = None
        self.u: A = None
        self.o: A = None
        self.x: H = None
        self.z: H = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: E = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: C = None
        self.o: A = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: B = None
        self.t: C = None
        self.s: C = None
        self.r: C = None
        self.w: E = None
        self.o: A = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: D = None
        self.txt = txt

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

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