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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: C = None
        self.v: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: I = None
        self.x: H = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: C = None
        self.u: J = None
        self.v: F = None
        self.y: C = None
        self.x: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: I = None
        self.y: J = None
        self.s: J = None
        self.q: I = None
        self.z: I = None
        self.v: C = None
        self.u: D = None
        self.w: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: H = None
        self.s: G = None
        self.z: C = None
        self.r: G = None
        self.v: B = None
        self.p: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: C = None
        self.v: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: I = None
        self.x: H = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: C = None
        self.u: J = None
        self.v: F = None
        self.y: C = None
        self.x: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: I = None
        self.y: J = None
        self.s: J = None
        self.q: I = None
        self.z: I = None
        self.v: C = None
        self.u: D = None
        self.w: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: H = None
        self.s: G = None
        self.z: C = None
        self.r: G = None
        self.v: B = None
        self.p: F = None
        self.txt = txt

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

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