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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: C = None
        self.p: C = None
        self.z: A = None
        self.r: A = None
        self.t: D = None
        self.txt = txt

j = A("j")
n = B("n")
i = C("i")
m = D("m")
a = E("a")
d = F("d")
k = C("k")
b = D("b")
l = B("l")
c = A("c")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: C = None
        self.p: C = None
        self.z: A = None
        self.r: A = None
        self.t: D = None
        self.txt = txt

j = A("j")
n = B("n")
i = C("i")
m = D("m")
a = E("a")
d = F("d")
k = C("k")
b = D("b")
l = B("l")
c = A("c")

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