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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: A = None
        self.u: I = None
        self.r: F = None
        self.t: A = None
        self.s: F = None
        self.v: A = None
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: D = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: B = None
        self.v: I = None
        self.r: A = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: I = None
        self.r: G = None
        self.q: F = None
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: A = None
        self.z: G = None
        self.w: D = None
        self.q: E = None
        self.p: D = None
        self.txt = txt

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

m.s = e
m.u = e
h.y = e
h.q = c
h.z = m
h.w = m
h.p = f
c.o = f
c.w = m
c.t = m
c.v = m
c.u = a
c.r = n
c.s = n
c.q = h
b.z = n
b.w = e
b.v = e
b.y = a
b.u = m
b.x = c
b.t = k
b.r = f
e.w = m
e.r = b
e.z = h
n.p = e
n.t = h
n.v = a
n.r = m
n.u = b
k.t = a
f.w = m
f.t = a
f.r = k
f.q = n
f.p = h
a.v = f
a.y = m
a.z = k
a.w = b
a.p = b
a.q = e
assert a.v.p.p.r.t.p.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: A = None
        self.u: I = None
        self.r: F = None
        self.t: A = None
        self.s: F = None
        self.v: A = None
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: D = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: B = None
        self.v: I = None
        self.r: A = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: I = None
        self.r: G = None
        self.q: F = None
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: A = None
        self.z: G = None
        self.w: D = None
        self.q: E = None
        self.p: D = None
        self.txt = txt

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

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