class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: G = None
        self.y: B = None
        self.v: D = None
        self.t: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: D = None
        self.r: C = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: I = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: G = None
        self.y: B = None
        self.v: D = None
        self.t: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: D = None
        self.r: C = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: I = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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

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

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