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

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

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

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

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

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

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

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

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

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

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

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

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

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

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