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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: D = None
        self.s: G = None
        self.o: B = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: D = None
        self.s: G = None
        self.o: B = None
        self.p: E = None
        self.txt = txt

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

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

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

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