class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: E = None
        self.x: B = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: E = None
        self.x: B = None
        self.txt = txt

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

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

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

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

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