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

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: D = None
        self.r: B = None
        self.t: B = None
        self.s: C = None
        self.x: H = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: A = None
        self.z: G = None
        self.t: E = None
        self.q: D = None
        self.txt = txt

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

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

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

n = A("n")
f = B("f")
d = C("d")
e = D("e")
b = E("b")
c = F("c")
i = G("i")
a = H("a")
l = E("l")
g = D("g")

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: D = None
        self.r: B = None
        self.t: B = None
        self.s: C = None
        self.x: H = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: A = None
        self.z: G = None
        self.t: E = None
        self.q: D = None
        self.txt = txt

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

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

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

n = A("n")
f = B("f")
d = C("d")
e = D("e")
b = E("b")
c = F("c")
i = G("i")
a = H("a")
l = E("l")
g = D("g")

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