class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: D = None
        self.w: D = None
        self.v: C = None
        self.x: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: E = None
        self.s: B = None
        self.y: A = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: E = None
        self.s: B = None
        self.y: A = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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