class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: B = None
        self.z: G = None
        self.u: D = None
        self.q: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: F = None
        self.z: A = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: G = None
        self.t: I = None
        self.z: B = None
        self.r: B = None
        self.p: C = None
        self.v: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: D = None
        self.o: G = None
        self.q: F = None
        self.v: G = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: F = None
        self.z: A = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: G = None
        self.t: I = None
        self.z: B = None
        self.r: B = None
        self.p: C = None
        self.v: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: D = None
        self.o: G = None
        self.q: F = None
        self.v: G = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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