class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: E = None
        self.r: I = None
        self.u: E = None
        self.v: E = None
        self.z: F = None
        self.o: I = None
        self.p: D = None
        self.y: E = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: A = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: F = None
        self.w: C = None
        self.y: B = None
        self.z: C = None
        self.p: G = None
        self.v: B = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: F = None
        self.p: B = None
        self.x: B = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: E = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: A = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: F = None
        self.w: C = None
        self.y: B = None
        self.z: C = None
        self.p: G = None
        self.v: B = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: F = None
        self.p: B = None
        self.x: B = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: E = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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