class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: H = None
        self.s: I = None
        self.y: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: F = None
        self.w: H = None
        self.y: A = None
        self.x: H = None
        self.u: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: D = None
        self.q: C = None
        self.x: C = None
        self.p: E = None
        self.o: B = None
        self.y: C = None
        self.s: B = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: F = None
        self.u: E = None
        self.x: A = None
        self.y: E = None
        self.r: G = None
        self.q: A = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: F = None
        self.s: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: F = None
        self.w: H = None
        self.y: A = None
        self.x: H = None
        self.u: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: D = None
        self.q: C = None
        self.x: C = None
        self.p: E = None
        self.o: B = None
        self.y: C = None
        self.s: B = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: F = None
        self.u: E = None
        self.x: A = None
        self.y: E = None
        self.r: G = None
        self.q: A = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: F = None
        self.s: D = None
        self.txt = txt

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

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