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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: H = None
        self.y: C = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: H = None
        self.y: C = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

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