class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: C = None
        self.q: G = None
        self.r: B = None
        self.p: H = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.q: G = None
        self.p: E = None
        self.s: I = None
        self.u: A = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: J = None
        self.w: H = None
        self.o: H = None
        self.v: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: G = None
        self.y: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.q: G = None
        self.p: E = None
        self.s: I = None
        self.u: A = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: J = None
        self.w: H = None
        self.o: H = None
        self.v: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: G = None
        self.y: F = None
        self.txt = txt

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

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

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