class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: C = None
        self.p: C = None
        self.x: J = None
        self.u: C = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: J = None
        self.r: G = None
        self.w: F = None
        self.s: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: G = None
        self.q: I = None
        self.w: F = None
        self.o: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: F = None
        self.r: H = None
        self.s: B = None
        self.w: E = None
        self.u: H = None
        self.z: C = None
        self.t: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: J = None
        self.r: G = None
        self.w: F = None
        self.s: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: G = None
        self.q: I = None
        self.w: F = None
        self.o: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: F = None
        self.r: H = None
        self.s: B = None
        self.w: E = None
        self.u: H = None
        self.z: C = None
        self.t: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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