class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: G = None
        self.v: A = None
        self.q: C = None
        self.t: C = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: C = None
        self.y: A = None
        self.x: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: E = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: C = None
        self.y: A = None
        self.x: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: E = None
        self.v: C = None
        self.txt = txt

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

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