class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: F = None
        self.w: D = None
        self.x: F = None
        self.p: D = None
        self.o: D = None
        self.t: F = None
        self.v: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: A = None
        self.s: F = None
        self.r: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: D = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: A = None
        self.s: F = None
        self.r: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: D = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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