class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: G = None
        self.x: B = None
        self.v: H = None
        self.u: H = None
        self.z: C = None
        self.r: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: F = None
        self.v: G = None
        self.w: B = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: E = None
        self.o: A = None
        self.z: E = None
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: C = None
        self.r: H = None
        self.o: D = None
        self.v: A = None
        self.z: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: F = None
        self.x: B = None
        self.y: B = None
        self.w: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: F = None
        self.v: G = None
        self.w: B = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: E = None
        self.o: A = None
        self.z: E = None
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: C = None
        self.r: H = None
        self.o: D = None
        self.v: A = None
        self.z: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: F = None
        self.x: B = None
        self.y: B = None
        self.w: B = None
        self.txt = txt

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

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

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