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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: C = None
        self.u: D = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: D = None
        self.z: B = None
        self.o: I = None
        self.r: I = None
        self.s: F = None
        self.t: C = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: B = None
        self.o: F = None
        self.s: F = None
        self.q: B = None
        self.z: B = None
        self.t: H = None
        self.w: A = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: C = None
        self.u: D = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: D = None
        self.z: B = None
        self.o: I = None
        self.r: I = None
        self.s: F = None
        self.t: C = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: B = None
        self.o: F = None
        self.s: F = None
        self.q: B = None
        self.z: B = None
        self.t: H = None
        self.w: A = None
        self.y: C = None
        self.txt = txt

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

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