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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: C = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: A = None
        self.o: A = None
        self.p: H = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: H = None
        self.x: F = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: D = None
        self.r: E = None
        self.o: A = None
        self.s: B = None
        self.w: A = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: C = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: A = None
        self.o: A = None
        self.p: H = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: H = None
        self.x: F = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: D = None
        self.r: E = None
        self.o: A = None
        self.s: B = None
        self.w: A = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: B = None
        self.txt = txt

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

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

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

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