class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: D = None
        self.v: E = None
        self.r: D = None
        self.o: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: C = None
        self.x: E = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: C = None
        self.x: E = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: D = None
        self.txt = txt

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

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