class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: F = None
        self.p: G = None
        self.v: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: E = None
        self.s: H = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: H = None
        self.o: J = None
        self.r: C = None
        self.q: B = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: C = None
        self.t: J = None
        self.p: A = None
        self.r: H = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: D = None
        self.w: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: E = None
        self.w: D = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: E = None
        self.s: H = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: H = None
        self.o: J = None
        self.r: C = None
        self.q: B = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: C = None
        self.t: J = None
        self.p: A = None
        self.r: H = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: D = None
        self.w: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: E = None
        self.w: D = None
        self.z: D = None
        self.txt = txt

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

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

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