class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: B = None
        self.u: F = None
        self.r: J = None
        self.p: H = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.p: B = None
        self.y: D = None
        self.t: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: J = None
        self.z: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: B = None
        self.v: I = None
        self.o: D = None
        self.p: C = None
        self.t: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.p: B = None
        self.y: D = None
        self.t: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: J = None
        self.z: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: B = None
        self.v: I = None
        self.o: D = None
        self.p: C = None
        self.t: A = None
        self.txt = txt

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

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