class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: G = None
        self.y: F = None
        self.t: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: A = None
        self.r: H = None
        self.u: I = None
        self.v: J = None
        self.txt = txt

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: D = None
        self.q: C = None
        self.w: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: A = None
        self.r: H = None
        self.u: I = None
        self.v: J = None
        self.txt = txt

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: D = None
        self.q: C = None
        self.w: C = None
        self.txt = txt

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

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