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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: A = None
        self.s: C = None
        self.y: B = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: A = None
        self.s: C = None
        self.y: B = None
        self.z: F = None
        self.txt = txt

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

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