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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: H = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: I = None
        self.t: A = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: H = None
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: G = None
        self.y: C = None
        self.w: J = None
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

d = A("d")
k = B("k")
i = C("i")
b = D("b")
g = E("g")
m = F("m")
l = G("l")
n = H("n")
f = I("f")
j = J("j")

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: H = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: I = None
        self.t: A = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: H = None
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: G = None
        self.y: C = None
        self.w: J = None
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

d = A("d")
k = B("k")
i = C("i")
b = D("b")
g = E("g")
m = F("m")
l = G("l")
n = H("n")
f = I("f")
j = J("j")

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