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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: F = None
        self.r: E = None
        self.y: I = None
        self.x: A = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: I = None
        self.r: A = None
        self.y: D = None
        self.t: I = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: I = None
        self.z: G = None
        self.x: F = None
        self.q: H = None
        self.r: B = None
        self.o: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: J = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: F = None
        self.z: D = None
        self.x: A = None
        self.q: C = None
        self.p: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: F = None
        self.s: A = None
        self.z: B = None
        self.r: B = None
        self.w: A = None
        self.x: E = None
        self.v: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: F = None
        self.r: E = None
        self.y: I = None
        self.x: A = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: I = None
        self.r: A = None
        self.y: D = None
        self.t: I = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: I = None
        self.z: G = None
        self.x: F = None
        self.q: H = None
        self.r: B = None
        self.o: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: J = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: F = None
        self.z: D = None
        self.x: A = None
        self.q: C = None
        self.p: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: F = None
        self.s: A = None
        self.z: B = None
        self.r: B = None
        self.w: A = None
        self.x: E = None
        self.v: A = None
        self.txt = txt

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

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