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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: J = None
        self.o: J = None
        self.t: E = None
        self.u: H = None
        self.p: J = None
        self.s: D = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: H = None
        self.x: C = None
        self.v: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: F = None
        self.x: A = None
        self.z: J = None
        self.o: B = None
        self.t: D = None
        self.r: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: J = None
        self.o: J = None
        self.t: E = None
        self.u: H = None
        self.p: J = None
        self.s: D = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: H = None
        self.x: C = None
        self.v: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: F = None
        self.x: A = None
        self.z: J = None
        self.o: B = None
        self.t: D = None
        self.r: H = None
        self.txt = txt

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

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

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