class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: C = None
        self.q: J = None
        self.v: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: B = None
        self.x: A = None
        self.s: C = None
        self.u: A = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: J = None
        self.u: J = None
        self.x: B = None
        self.y: I = None
        self.s: D = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: H = None
        self.u: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: B = None
        self.x: A = None
        self.s: C = None
        self.u: A = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: J = None
        self.u: J = None
        self.x: B = None
        self.y: I = None
        self.s: D = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: H = None
        self.u: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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