class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: J = None
        self.q: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: F = None
        self.p: B = None
        self.v: C = None
        self.o: I = None
        self.z: J = None
        self.x: A = None
        self.u: C = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: G = None
        self.x: E = None
        self.y: H = None
        self.r: C = None
        self.p: G = None
        self.t: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: D = None
        self.y: C = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: E = None
        self.y: D = None
        self.v: E = None
        self.s: J = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: F = None
        self.p: B = None
        self.v: C = None
        self.o: I = None
        self.z: J = None
        self.x: A = None
        self.u: C = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: G = None
        self.x: E = None
        self.y: H = None
        self.r: C = None
        self.p: G = None
        self.t: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: D = None
        self.y: C = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: E = None
        self.y: D = None
        self.v: E = None
        self.s: J = None
        self.txt = txt

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

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

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