class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: D = None
        self.x: H = None
        self.t: C = None
        self.r: D = None
        self.w: I = None
        self.p: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: J = None
        self.u: G = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: H = None
        self.p: G = None
        self.s: B = None
        self.y: G = None
        self.o: G = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: J = None
        self.p: C = None
        self.x: C = None
        self.z: A = None
        self.y: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: J = None
        self.u: G = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: H = None
        self.p: G = None
        self.s: B = None
        self.y: G = None
        self.o: G = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: J = None
        self.p: C = None
        self.x: C = None
        self.z: A = None
        self.y: D = None
        self.txt = txt

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

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

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