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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: E = None
        self.x: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: E = None
        self.w: C = None
        self.t: A = None
        self.y: D = None
        self.o: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: D = None
        self.s: J = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: E = None
        self.x: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: E = None
        self.w: C = None
        self.t: A = None
        self.y: D = None
        self.o: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: D = None
        self.s: J = None
        self.z: D = None
        self.txt = txt

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

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

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

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