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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: D = None
        self.w: I = None
        self.z: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: E = None
        self.p: D = None
        self.u: F = None
        self.t: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.r: G = None
        self.t: C = None
        self.w: G = None
        self.y: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: D = None
        self.w: I = None
        self.z: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: E = None
        self.p: D = None
        self.u: F = None
        self.t: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.r: G = None
        self.t: C = None
        self.w: G = None
        self.y: C = None
        self.txt = txt

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

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

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

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