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

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: E = None
        self.p: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: I = None
        self.w: I = None
        self.y: I = None
        self.p: A = None
        self.x: I = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: D = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: C = None
        self.x: J = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: G = None
        self.v: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: E = None
        self.p: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: I = None
        self.w: I = None
        self.y: I = None
        self.p: A = None
        self.x: I = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: D = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: C = None
        self.x: J = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: G = None
        self.v: A = None
        self.txt = txt

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

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

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