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

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

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: C = None
        self.s: F = None
        self.q: D = None
        self.w: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: G = None
        self.o: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: D = None
        self.o: H = None
        self.y: C = None
        self.q: F = None
        self.x: E = None
        self.v: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: C = None
        self.s: F = None
        self.q: D = None
        self.w: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: G = None
        self.o: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: D = None
        self.o: H = None
        self.y: C = None
        self.q: F = None
        self.x: E = None
        self.v: A = None
        self.txt = txt

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

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