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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: F = None
        self.t: A = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: I = None
        self.o: D = None
        self.p: A = None
        self.r: H = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: F = None
        self.q: E = None
        self.v: E = None
        self.z: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: A = None
        self.w: B = None
        self.x: A = None
        self.o: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: F = None
        self.t: A = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: I = None
        self.o: D = None
        self.p: A = None
        self.r: H = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: F = None
        self.q: E = None
        self.v: E = None
        self.z: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: A = None
        self.w: B = None
        self.x: A = None
        self.o: E = None
        self.txt = txt

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

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