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

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

class C:
    def __init__(self, txt: str):
        self.t: I = 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.w: B = None
        self.u: A = None
        self.v: G = None
        self.p: I = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: I = 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.w: B = None
        self.u: A = None
        self.v: G = None
        self.p: I = None
        self.txt = txt

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

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

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

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

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

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