class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: D = None
        self.txt = txt

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

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

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