class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: G = None
        self.p: E = None
        self.u: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: C = None
        self.w: B = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: G = None
        self.p: E = None
        self.u: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: C = None
        self.w: B = None
        self.x: E = None
        self.txt = txt

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

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