class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: E = None
        self.p: C = None
        self.x: E = None
        self.w: E = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: F = None
        self.y: I = None
        self.q: E = None
        self.s: J = None
        self.p: E = None
        self.r: E = None
        self.u: J = None
        self.x: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: A = None
        self.z: B = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: E = None
        self.t: C = None
        self.q: B = None
        self.s: C = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: H = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: J = None
        self.r: B = None
        self.v: C = None
        self.x: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: B = None
        self.x: A = None
        self.o: G = None
        self.p: A = None
        self.z: I = None
        self.w: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: F = None
        self.y: I = None
        self.q: E = None
        self.s: J = None
        self.p: E = None
        self.r: E = None
        self.u: J = None
        self.x: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: A = None
        self.z: B = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: E = None
        self.t: C = None
        self.q: B = None
        self.s: C = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: H = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: J = None
        self.r: B = None
        self.v: C = None
        self.x: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: B = None
        self.x: A = None
        self.o: G = None
        self.p: A = None
        self.z: I = None
        self.w: F = None
        self.txt = txt

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

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