class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: F = None
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: J = None
        self.w: A = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: C = None
        self.q: J = None
        self.o: C = None
        self.t: C = None
        self.z: F = None
        self.w: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: H = None
        self.q: H = None
        self.y: J = None
        self.t: A = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.v: I = None
        self.z: B = None
        self.u: A = None
        self.w: D = None
        self.q: B = None
        self.s: D = None
        self.y: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: E = None
        self.s: F = None
        self.p: C = None
        self.q: J = None
        self.w: J = None
        self.t: E = None
        self.r: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: J = None
        self.w: A = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: C = None
        self.q: J = None
        self.o: C = None
        self.t: C = None
        self.z: F = None
        self.w: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: H = None
        self.q: H = None
        self.y: J = None
        self.t: A = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.v: I = None
        self.z: B = None
        self.u: A = None
        self.w: D = None
        self.q: B = None
        self.s: D = None
        self.y: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: E = None
        self.s: F = None
        self.p: C = None
        self.q: J = None
        self.w: J = None
        self.t: E = None
        self.r: A = None
        self.txt = txt

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

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

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