class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: B = None
        self.x: F = None
        self.s: G = None
        self.p: G = None
        self.t: D = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: E = None
        self.u: D = None
        self.z: D = None
        self.t: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: F = None
        self.z: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: G = None
        self.w: E = None
        self.o: B = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: B = None
        self.o: B = None
        self.x: F = None
        self.r: C = None
        self.txt = txt

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

e = A("e")
h = B("h")
k = C("k")
f = D("f")
b = E("b")
d = F("d")
i = G("i")
m = H("m")
j = E("j")

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: E = None
        self.u: D = None
        self.z: D = None
        self.t: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: F = None
        self.z: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: G = None
        self.w: E = None
        self.o: B = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: B = None
        self.o: B = None
        self.x: F = None
        self.r: C = None
        self.txt = txt

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

e = A("e")
h = B("h")
k = C("k")
f = D("f")
b = E("b")
d = F("d")
i = G("i")
m = H("m")
j = E("j")

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