class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: G = None
        self.r: J = None
        self.o: E = None
        self.s: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: H = None
        self.s: J = None
        self.v: E = None
        self.r: I = None
        self.t: C = None
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: A = None
        self.x: D = None
        self.o: A = None
        self.u: G = None
        self.r: D = None
        self.z: J = None
        self.s: G = None
        self.y: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: D = None
        self.u: B = None
        self.s: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: G = None
        self.p: B = None
        self.o: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: A = None
        self.t: I = None
        self.r: D = None
        self.y: D = None
        self.q: G = None
        self.v: D = None
        self.x: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: H = None
        self.s: J = None
        self.v: E = None
        self.r: I = None
        self.t: C = None
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: A = None
        self.x: D = None
        self.o: A = None
        self.u: G = None
        self.r: D = None
        self.z: J = None
        self.s: G = None
        self.y: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: D = None
        self.u: B = None
        self.s: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: G = None
        self.p: B = None
        self.o: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: A = None
        self.t: I = None
        self.r: D = None
        self.y: D = None
        self.q: G = None
        self.v: D = None
        self.x: C = None
        self.txt = txt

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

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