class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: C = None
        self.z: G = None
        self.o: E = None
        self.p: I = None
        self.r: C = None
        self.t: E = None
        self.u: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: H = None
        self.x: B = None
        self.s: B = None
        self.q: D = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: C = None
        self.x: E = None
        self.v: I = None
        self.t: F = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: H = None
        self.x: B = None
        self.s: B = None
        self.q: D = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: C = None
        self.x: E = None
        self.v: I = None
        self.t: F = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: C = None
        self.txt = txt

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

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