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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: B = None
        self.s: F = None
        self.u: F = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: E = None
        self.y: E = None
        self.r: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: D = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: B = None
        self.s: F = None
        self.u: F = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: E = None
        self.y: E = None
        self.r: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: D = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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