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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: G = None
        self.y: E = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: F = None
        self.y: D = None
        self.o: J = None
        self.u: E = None
        self.p: G = None
        self.v: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.o: B = None
        self.p: H = None
        self.v: J = None
        self.s: I = None
        self.r: I = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: I = None
        self.w: G = None
        self.q: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: G = None
        self.y: E = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: F = None
        self.y: D = None
        self.o: J = None
        self.u: E = None
        self.p: G = None
        self.v: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.o: B = None
        self.p: H = None
        self.v: J = None
        self.s: I = None
        self.r: I = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: I = None
        self.w: G = None
        self.q: E = None
        self.txt = txt

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

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