class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: B = None
        self.t: D = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: G = None
        self.w: E = None
        self.x: B = None
        self.p: G = None
        self.q: E = None
        self.y: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: E = None
        self.y: F = None
        self.p: H = None
        self.o: E = None
        self.x: C = None
        self.r: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: G = None
        self.w: E = None
        self.x: B = None
        self.p: G = None
        self.q: E = None
        self.y: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: E = None
        self.y: F = None
        self.p: H = None
        self.o: E = None
        self.x: C = None
        self.r: E = None
        self.txt = txt

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

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

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