class A:
    def __init__(self, txt: str):
        self.v: J = None
        self.x: I = None
        self.z: E = None
        self.p: C = None
        self.s: D = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: C = None
        self.t: A = None
        self.o: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: A = None
        self.x: B = None
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: B = None
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: J = None
        self.v: B = None
        self.t: I = None
        self.o: J = None
        self.s: I = None
        self.r: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: H = None
        self.o: H = None
        self.w: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: C = None
        self.t: A = None
        self.o: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: A = None
        self.x: B = None
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: B = None
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: J = None
        self.v: B = None
        self.t: I = None
        self.o: J = None
        self.s: I = None
        self.r: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: H = None
        self.o: H = None
        self.w: I = None
        self.txt = txt

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

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