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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: F = None
        self.v: J = None
        self.t: H = None
        self.p: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: B = None
        self.y: I = None
        self.v: D = None
        self.w: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: H = None
        self.r: J = None
        self.s: B = None
        self.z: C = None
        self.v: B = None
        self.t: B = None
        self.x: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: B = None
        self.t: F = None
        self.o: D = None
        self.v: F = None
        self.z: F = None
        self.s: F = None
        self.w: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: F = None
        self.v: J = None
        self.t: H = None
        self.p: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: B = None
        self.y: I = None
        self.v: D = None
        self.w: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: H = None
        self.r: J = None
        self.s: B = None
        self.z: C = None
        self.v: B = None
        self.t: B = None
        self.x: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: B = None
        self.t: F = None
        self.o: D = None
        self.v: F = None
        self.z: F = None
        self.s: F = None
        self.w: A = None
        self.txt = txt

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

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