class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: B = None
        self.r: B = None
        self.u: C = None
        self.p: G = None
        self.w: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: C = None
        self.o: F = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: C = None
        self.o: F = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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