class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: F = None
        self.y: F = None
        self.s: C = None
        self.x: G = None
        self.t: H = None
        self.u: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: B = None
        self.w: G = None
        self.u: A = None
        self.s: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.u: H = None
        self.w: A = None
        self.r: B = None
        self.z: C = None
        self.p: A = None
        self.y: J = None
        self.q: H = None
        self.x: J = 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.z: B = None
        self.v: C = None
        self.q: J = None
        self.x: E = None
        self.o: A = None
        self.p: E = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: B = None
        self.w: G = None
        self.u: A = None
        self.s: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.u: H = None
        self.w: A = None
        self.r: B = None
        self.z: C = None
        self.p: A = None
        self.y: J = None
        self.q: H = None
        self.x: J = 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.z: B = None
        self.v: C = None
        self.q: J = None
        self.x: E = None
        self.o: A = None
        self.p: E = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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