class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: H = None
        self.o: B = None
        self.s: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: J = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: E = None
        self.v: F = None
        self.q: I = None
        self.y: E = None
        self.t: J = None
        self.u: F = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

c = A("c")
i = B("i")
g = C("g")
m = D("m")
h = E("h")
l = F("l")
n = G("n")
j = H("j")
b = I("b")
d = J("d")

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: J = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: E = None
        self.v: F = None
        self.q: I = None
        self.y: E = None
        self.t: J = None
        self.u: F = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

c = A("c")
i = B("i")
g = C("g")
m = D("m")
h = E("h")
l = F("l")
n = G("n")
j = H("j")
b = I("b")
d = J("d")

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