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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: F = None
        self.t: D = None
        self.o: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: B = None
        self.r: E = None
        self.s: B = None
        self.v: C = None
        self.txt = txt

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

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

h = A("h")
a = B("a")
n = C("n")
e = D("e")
l = E("l")
g = F("g")
i = C("i")
f = C("f")

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: F = None
        self.t: D = None
        self.o: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: B = None
        self.r: E = None
        self.s: B = None
        self.v: C = None
        self.txt = txt

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

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

h = A("h")
a = B("a")
n = C("n")
e = D("e")
l = E("l")
g = F("g")
i = C("i")
f = C("f")

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