class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: F = None
        self.x: I = None
        self.r: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: F = None
        self.s: G = None
        self.z: E = None
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: I = None
        self.p: B = None
        self.w: H = None
        self.r: B = None
        self.y: A = None
        self.t: I = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: D = None
        self.s: B = None
        self.y: B = None
        self.t: D = None
        self.v: B = None
        self.w: I = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: F = None
        self.u: E = None
        self.w: D = None
        self.txt = txt

m = A("m")
f = B("f")
n = C("n")
b = D("b")
d = E("d")
h = F("h")
k = G("k")
l = H("l")
j = I("j")
a = D("a")

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: F = None
        self.s: G = None
        self.z: E = None
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: I = None
        self.p: B = None
        self.w: H = None
        self.r: B = None
        self.y: A = None
        self.t: I = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: D = None
        self.s: B = None
        self.y: B = None
        self.t: D = None
        self.v: B = None
        self.w: I = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: F = None
        self.u: E = None
        self.w: D = None
        self.txt = txt

m = A("m")
f = B("f")
n = C("n")
b = D("b")
d = E("d")
h = F("h")
k = G("k")
l = H("l")
j = I("j")
a = D("a")

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