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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: C = None
        self.q: C = None
        self.p: A = None
        self.s: B = None
        self.w: H = None
        self.z: I = None
        self.v: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: J = None
        self.s: D = None
        self.r: A = None
        self.u: E = None
        self.p: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: F = None
        self.y: H = None
        self.u: C = None
        self.z: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: C = None
        self.t: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: C = None
        self.q: C = None
        self.p: A = None
        self.s: B = None
        self.w: H = None
        self.z: I = None
        self.v: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: J = None
        self.s: D = None
        self.r: A = None
        self.u: E = None
        self.p: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: F = None
        self.y: H = None
        self.u: C = None
        self.z: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: C = None
        self.t: D = None
        self.txt = txt

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

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