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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: B = None
        self.v: A = None
        self.r: E = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: B = None
        self.v: A = None
        self.r: E = None
        self.u: F = None
        self.txt = txt

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

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

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

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

k.x = e
k.z = e
k.s = j
a.w = j
a.p = j
a.x = j
a.t = b
b.y = j
b.u = j
b.s = a
b.v = e
b.r = m
g.t = l
g.w = e
g.y = n
g.p = a
g.v = j
m.u = a
m.v = a
m.x = a
m.r = b
m.o = f
m.w = n
j.z = n
j.y = a
f.t = l
f.y = l
f.w = k
f.p = a
f.v = j
e.x = k
e.z = k
e.s = j
l.u = a
l.v = a
l.x = a
l.r = b
l.o = g
l.w = m
n.u = a
n.v = a
n.x = a
n.r = b
n.o = g
n.w = l
assert k.s.z.r.s.w.z.r.s.p.z.txt == "n"