class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: H = None
        self.r: E = None
        self.u: D = None
        self.p: F = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: F = None
        self.p: F = None
        self.z: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: B = None
        self.v: C = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: C = None
        self.z: C = None
        self.w: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: D = None
        self.p: C = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: D = None
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: F = None
        self.p: F = None
        self.z: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: B = None
        self.v: C = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: C = None
        self.z: C = None
        self.w: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: D = None
        self.p: C = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: D = None
        self.z: A = None
        self.txt = txt

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

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