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

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: H = None
        self.u: A = None
        self.z: J = None
        self.o: B = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: J = None
        self.u: G = None
        self.p: I = None
        self.o: H = None
        self.z: F = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: C = None
        self.t: H = None
        self.q: C = None
        self.y: C = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: J = None
        self.s: C = None
        self.z: E = None
        self.x: B = None
        self.t: J = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: J = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: H = None
        self.u: A = None
        self.z: J = None
        self.o: B = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: J = None
        self.u: G = None
        self.p: I = None
        self.o: H = None
        self.z: F = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: C = None
        self.t: H = None
        self.q: C = None
        self.y: C = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: J = None
        self.s: C = None
        self.z: E = None
        self.x: B = None
        self.t: J = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: J = None
        self.r: F = None
        self.txt = txt

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

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

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