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

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: B = None
        self.o: G = None
        self.r: G = None
        self.p: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: H = None
        self.t: F = None
        self.s: H = None
        self.y: E = None
        self.w: D = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: F = None
        self.u: A = None
        self.s: D = None
        self.q: A = None
        self.r: F = None
        self.y: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: B = None
        self.o: G = None
        self.r: G = None
        self.p: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: H = None
        self.t: F = None
        self.s: H = None
        self.y: E = None
        self.w: D = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: F = None
        self.u: A = None
        self.s: D = None
        self.q: A = None
        self.r: F = None
        self.y: D = None
        self.txt = txt

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

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