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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: E = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: A = None
        self.y: B = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: C = None
        self.w: E = None
        self.p: A = None
        self.o: A = None
        self.u: E = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: F = None
        self.u: J = None
        self.s: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: E = None
        self.r: H = None
        self.y: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: I = None
        self.s: D = None
        self.r: C = None
        self.u: I = None
        self.y: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: E = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: A = None
        self.y: B = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: C = None
        self.w: E = None
        self.p: A = None
        self.o: A = None
        self.u: E = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: F = None
        self.u: J = None
        self.s: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: E = None
        self.r: H = None
        self.y: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: I = None
        self.s: D = None
        self.r: C = None
        self.u: I = None
        self.y: G = None
        self.txt = txt

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

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