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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: E = None
        self.t: H = None
        self.r: E = None
        self.u: D = None
        self.z: G = None
        self.o: J = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: C = None
        self.p: A = None
        self.y: C = None
        self.s: A = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: A = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: A = None
        self.z: B = None
        self.x: D = None
        self.y: J = None
        self.txt = txt

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

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

l = A("l")
c = B("c")
h = C("h")
b = D("b")
d = E("d")
k = F("k")
a = G("a")
j = H("j")
f = I("f")
e = J("e")

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: E = None
        self.t: H = None
        self.r: E = None
        self.u: D = None
        self.z: G = None
        self.o: J = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: C = None
        self.p: A = None
        self.y: C = None
        self.s: A = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: A = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: A = None
        self.z: B = None
        self.x: D = None
        self.y: J = None
        self.txt = txt

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

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

l = A("l")
c = B("c")
h = C("h")
b = D("b")
d = E("d")
k = F("k")
a = G("a")
j = H("j")
f = I("f")
e = J("e")

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