class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: G = None
        self.u: F = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: G = None
        self.p: E = None
        self.t: D = None
        self.x: G = None
        self.q: F = None
        self.r: B = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: B = None
        self.s: C = None
        self.t: G = None
        self.w: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: F = None
        self.x: F = None
        self.z: F = None
        self.q: E = None
        self.o: F = None
        self.s: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: G = None
        self.u: F = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: G = None
        self.p: E = None
        self.t: D = None
        self.x: G = None
        self.q: F = None
        self.r: B = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: B = None
        self.s: C = None
        self.t: G = None
        self.w: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: F = None
        self.x: F = None
        self.z: F = None
        self.q: E = None
        self.o: F = None
        self.s: E = None
        self.txt = txt

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

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