class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: A = None
        self.u: B = None
        self.r: B = None
        self.o: B = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: F = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

f.w = h
f.q = b
f.u = e
f.r = e
f.o = e
f.s = e
e.r = m
e.v = l
e.z = l
n.p = l
n.v = e
n.s = e
n.z = j
n.y = h
m.z = b
m.x = f
m.v = l
m.p = l
h.q = c
l.o = e
l.x = n
l.z = b
l.p = h
c.p = l
c.v = e
c.s = e
c.z = m
c.y = h
j.z = b
j.x = f
j.v = l
j.p = l
b.w = h
b.q = f
b.u = e
b.r = e
b.o = e
b.s = e
g.z = f
g.x = b
g.v = l
g.p = l
assert m.p.z.q.w.q.v.z.x.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: A = None
        self.u: B = None
        self.r: B = None
        self.o: B = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: F = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

f.w = h
f.q = b
f.u = e
f.r = e
f.o = e
f.s = e
e.r = m
e.v = l
e.z = l
n.p = l
n.v = e
n.s = e
n.z = j
n.y = h
m.z = b
m.x = f
m.v = l
m.p = l
h.q = c
l.o = e
l.x = n
l.z = b
l.p = h
c.p = l
c.v = e
c.s = e
c.z = m
c.y = h
j.z = b
j.x = f
j.v = l
j.p = l
b.w = h
b.q = f
b.u = e
b.r = e
b.o = e
b.s = e
g.z = f
g.x = b
g.v = l
g.p = l
assert m.p.z.q.w.q.v.z.x.txt == "n"