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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: F = None
        self.q: G = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: F = None
        self.q: G = None
        self.txt = txt

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

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

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

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

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