class A:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: G = None
        self.p: E = None
        self.r: F = None
        self.y: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: H = None
        self.r: I = None
        self.u: A = None
        self.p: G = None
        self.o: E = None
        self.s: A = None
        self.q: D = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: D = None
        self.q: I = None
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: I = None
        self.v: B = None
        self.q: F = None
        self.s: H = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: G = None
        self.p: C = None
        self.t: A = None
        self.r: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: H = None
        self.r: I = None
        self.u: A = None
        self.p: G = None
        self.o: E = None
        self.s: A = None
        self.q: D = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: D = None
        self.q: I = None
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: I = None
        self.v: B = None
        self.q: F = None
        self.s: H = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: G = None
        self.p: C = None
        self.t: A = None
        self.r: D = None
        self.txt = txt

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

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

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