class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: F = None
        self.v: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: B = None
        self.v: C = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: B = None
        self.v: C = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

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