class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: G = None
        self.p: C = None
        self.x: E = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: D = None
        self.u: C = None
        self.q: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: F = None
        self.x: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: B = None
        self.p: I = None
        self.y: E = None
        self.u: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: D = None
        self.u: C = None
        self.q: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: F = None
        self.x: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: B = None
        self.p: I = None
        self.y: E = None
        self.u: B = None
        self.txt = txt

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

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