class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: F = None
        self.u: D = None
        self.z: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: F = None
        self.o: A = None
        self.r: G = None
        self.w: I = None
        self.x: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: D = None
        self.z: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: C = None
        self.o: C = None
        self.t: I = None
        self.q: E = None
        self.w: E = None
        self.z: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: H = None
        self.w: C = None
        self.z: J = None
        self.r: F = None
        self.p: H = None
        self.x: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: A = None
        self.p: A = None
        self.t: C = None
        self.r: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: F = None
        self.o: A = None
        self.r: G = None
        self.w: I = None
        self.x: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: D = None
        self.z: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: C = None
        self.o: C = None
        self.t: I = None
        self.q: E = None
        self.w: E = None
        self.z: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: H = None
        self.w: C = None
        self.z: J = None
        self.r: F = None
        self.p: H = None
        self.x: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: A = None
        self.p: A = None
        self.t: C = None
        self.r: G = None
        self.txt = txt

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

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