class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: B = None
        self.z: E = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: E = None
        self.s: G = None
        self.y: F = None
        self.w: C = None
        self.z: C = None
        self.p: H = None
        self.txt = txt

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

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

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

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

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

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

b = A("b")
i = B("i")
a = C("a")
j = D("j")
n = E("n")
m = F("m")
l = G("l")
e = H("e")

b.v = i
b.t = i
b.y = i
b.z = n
i.q = n
i.x = n
i.s = l
i.y = m
i.w = a
i.z = a
i.p = e
a.y = j
a.x = n
a.o = e
a.v = b
a.z = m
j.y = b
j.q = n
n.u = j
m.u = l
m.v = l
m.x = a
m.o = a
m.p = j
l.w = e
l.u = e
l.p = m
l.q = m
e.z = m
e.q = m
e.s = a
e.w = n
e.v = l
e.u = l
e.t = j
assert j.q.u.q.u.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: B = None
        self.z: E = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: E = None
        self.s: G = None
        self.y: F = None
        self.w: C = None
        self.z: C = None
        self.p: H = None
        self.txt = txt

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

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

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

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

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

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

b = A("b")
i = B("i")
a = C("a")
j = D("j")
n = E("n")
m = F("m")
l = G("l")
e = H("e")

b.v = i
b.t = i
b.y = i
b.z = n
i.q = n
i.x = n
i.s = l
i.y = m
i.w = a
i.z = a
i.p = e
a.y = j
a.x = n
a.o = e
a.v = b
a.z = m
j.y = b
j.q = n
n.u = j
m.u = l
m.v = l
m.x = a
m.o = a
m.p = j
l.w = e
l.u = e
l.p = m
l.q = m
e.z = m
e.q = m
e.s = a
e.w = n
e.v = l
e.u = l
e.t = j
assert j.q.u.q.u.txt == "j"