class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: E = None
        self.x: H = None
        self.t: I = None
        self.p: C = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: E = None
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.o: H = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: A = None
        self.q: I = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: G = None
        self.z: I = None
        self.p: J = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: G = None
        self.q: D = None
        self.r: G = None
        self.z: B = None
        self.x: G = None
        self.u: A = None
        self.v: B = None
        self.o: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: E = None
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.o: H = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: A = None
        self.q: I = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: G = None
        self.z: I = None
        self.p: J = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: G = None
        self.q: D = None
        self.r: G = None
        self.z: B = None
        self.x: G = None
        self.u: A = None
        self.v: B = None
        self.o: G = None
        self.txt = txt

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

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

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