class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: G = None
        self.o: F = None
        self.q: E = None
        self.y: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: A = None
        self.o: B = None
        self.y: G = None
        self.w: B = None
        self.v: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: F = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: A = None
        self.o: B = None
        self.y: G = None
        self.w: B = None
        self.v: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: F = None
        self.z: E = None
        self.txt = txt

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

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