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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: A = None
        self.u: E = None
        self.s: D = None
        self.w: A = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: C = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: A = None
        self.u: E = None
        self.s: D = None
        self.w: A = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: C = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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