class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: E = None
        self.r: F = None
        self.s: D = None
        self.o: F = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: E = None
        self.o: D = None
        self.w: F = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: A = None
        self.q: A = None
        self.p: E = None
        self.w: G = None
        self.o: B = None
        self.u: F = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: D = None
        self.v: F = None
        self.p: C = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

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

a.q = l
a.v = e
a.r = h
a.o = h
a.s = g
a.p = g
k.q = l
k.t = e
k.o = g
k.w = h
k.s = i
i.v = e
g.t = i
g.z = a
g.q = a
g.p = e
g.w = d
g.o = k
g.v = k
g.u = h
e.x = h
e.v = h
e.u = g
e.s = g
e.p = i
h.u = e
d.q = h
l.q = k
l.s = i
l.r = g
l.z = d
l.x = a
assert d.q.u.p.v.v.u.v.u.txt == "
class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: E = None
        self.r: F = None
        self.s: D = None
        self.o: F = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: E = None
        self.o: D = None
        self.w: F = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: A = None
        self.q: A = None
        self.p: E = None
        self.w: G = None
        self.o: B = None
        self.u: F = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: D = None
        self.v: F = None
        self.p: C = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

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

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