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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: A = None
        self.s: I = None
        self.v: D = None
        self.p: A = None
        self.u: F = None
        self.y: G = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: E = None
        self.u: E = None
        self.x: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: A = None
        self.o: A = None
        self.q: G = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: A = None
        self.s: A = None
        self.z: A = None
        self.y: A = None
        self.w: B = None
        self.u: A = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: D = None
        self.o: D = None
        self.p: B = None
        self.t: C = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: E = None
        self.w: J = None
        self.x: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: A = None
        self.s: I = None
        self.v: D = None
        self.p: A = None
        self.u: F = None
        self.y: G = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: E = None
        self.u: E = None
        self.x: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: A = None
        self.o: A = None
        self.q: G = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: A = None
        self.s: A = None
        self.z: A = None
        self.y: A = None
        self.w: B = None
        self.u: A = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: D = None
        self.o: D = None
        self.p: B = None
        self.t: C = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: E = None
        self.w: J = None
        self.x: J = None
        self.txt = txt

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

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

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