class A:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: D = None
        self.o: F = None
        self.x: J = None
        self.y: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: F = None
        self.w: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: I = None
        self.v: H = None
        self.w: F = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: F = None
        self.w: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: I = None
        self.v: H = None
        self.w: F = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

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