class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: D = None
        self.u: D = None
        self.y: A = None
        self.p: E = None
        self.s: B = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: E = None
        self.o: C = None
        self.y: G = None
        self.x: B = None
        self.v: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: B = None
        self.r: B = None
        self.o: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: D = None
        self.u: D = None
        self.y: A = None
        self.p: E = None
        self.s: B = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: E = None
        self.o: C = None
        self.y: G = None
        self.x: B = None
        self.v: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: B = None
        self.r: B = None
        self.o: G = None
        self.txt = txt

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

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