class A:
    def __init__(self, txt: str):
        self.u: J = None
        self.z: H = None
        self.p: J = None
        self.r: C = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: C = None
        self.y: D = None
        self.w: I = None
        self.t: F = None
        self.z: D = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: H = None
        self.t: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

e = A("e")
g = B("g")
m = C("m")
c = D("c")
j = E("j")
a = F("a")
b = G("b")
k = H("k")
n = I("n")
d = J("d")

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: C = None
        self.y: D = None
        self.w: I = None
        self.t: F = None
        self.z: D = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: H = None
        self.t: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

e = A("e")
g = B("g")
m = C("m")
c = D("c")
j = E("j")
a = F("a")
b = G("b")
k = H("k")
n = I("n")
d = J("d")

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