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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: D = None
        self.o: G = None
        self.z: H = None
        self.t: D = None
        self.p: G = None
        self.q: E = None
        self.u: I = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: H = None
        self.t: I = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: I = None
        self.y: D = None
        self.x: J = None
        self.z: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: D = None
        self.o: G = None
        self.z: H = None
        self.t: D = None
        self.p: G = None
        self.q: E = None
        self.u: I = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: H = None
        self.t: I = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: I = None
        self.y: D = None
        self.x: J = None
        self.z: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

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

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

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

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