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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: D = None
        self.u: H = None
        self.t: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: F = None
        self.y: C = None
        self.w: A = None
        self.s: C = None
        self.o: G = None
        self.u: E = None
        self.txt = txt

a = A("a")
l = B("l")
c = C("c")
e = D("e")
k = E("k")
f = F("f")
m = G("m")
j = H("j")

a.z = e
a.w = e
a.y = e
a.u = e
a.p = k
a.s = f
l.s = k
l.z = a
l.o = j
l.v = c
c.s = f
e.w = f
k.o = a
k.q = e
k.u = j
k.t = j
f.u = e
f.q = a
m.p = k
m.t = e
m.s = e
m.w = f
m.q = j
j.p = m
j.o = m
j.t = f
j.y = c
j.s = c
j.w = a
j.u = k
assert f.u.w.u.w.q.p.q.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: D = None
        self.p: E = None
        self.y: D = None
        self.s: F = None
        self.u: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: D = None
        self.u: H = None
        self.t: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: F = None
        self.y: C = None
        self.w: A = None
        self.s: C = None
        self.o: G = None
        self.u: E = None
        self.txt = txt

a = A("a")
l = B("l")
c = C("c")
e = D("e")
k = E("k")
f = F("f")
m = G("m")
j = H("j")

a.z = e
a.w = e
a.y = e
a.u = e
a.p = k
a.s = f
l.s = k
l.z = a
l.o = j
l.v = c
c.s = f
e.w = f
k.o = a
k.q = e
k.u = j
k.t = j
f.u = e
f.q = a
m.p = k
m.t = e
m.s = e
m.w = f
m.q = j
j.p = m
j.o = m
j.t = f
j.y = c
j.s = c
j.w = a
j.u = k
assert f.u.w.u.w.q.p.q.txt == "e"