class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: H = None
        self.o: B = None
        self.w: F = None
        self.x: H = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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