class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: E = None
        self.z: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: A = None
        self.o: J = None
        self.x: D = None
        self.w: A = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: I = None
        self.s: J = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.p: I = None
        self.x: G = None
        self.t: C = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: J = None
        self.v: I = None
        self.p: F = None
        self.y: J = None
        self.w: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.q: E = None
        self.v: B = None
        self.p: J = None
        self.r: F = None
        self.u: D = None
        self.w: A = None
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: B = None
        self.q: D = None
        self.r: D = None
        self.w: F = None
        self.v: B = None
        self.u: D = None
        self.p: B = None
        self.s: H = None
        self.txt = txt

m = A("m")
l = B("l")
g = C("g")
k = D("k")
e = E("e")
b = F("b")
d = G("d")
f = H("f")
i = I("i")
a = J("a")

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: A = None
        self.o: J = None
        self.x: D = None
        self.w: A = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: I = None
        self.s: J = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.p: I = None
        self.x: G = None
        self.t: C = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: J = None
        self.v: I = None
        self.p: F = None
        self.y: J = None
        self.w: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.q: E = None
        self.v: B = None
        self.p: J = None
        self.r: F = None
        self.u: D = None
        self.w: A = None
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: B = None
        self.q: D = None
        self.r: D = None
        self.w: F = None
        self.v: B = None
        self.u: D = None
        self.p: B = None
        self.s: H = None
        self.txt = txt

m = A("m")
l = B("l")
g = C("g")
k = D("k")
e = E("e")
b = F("b")
d = G("d")
f = H("f")
i = I("i")
a = J("a")

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