class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: H = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: C = None
        self.x: C = None
        self.o: E = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: A = None
        self.z: E = None
        self.r: B = None
        self.u: A = None
        self.p: E = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: C = None
        self.x: C = None
        self.o: E = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: A = None
        self.z: E = None
        self.r: B = None
        self.u: A = None
        self.p: E = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

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