class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: B = None
        self.p: I = None
        self.v: H = None
        self.w: B = None
        self.u: D = None
        self.o: G = None
        self.z: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: A = None
        self.o: C = None
        self.u: H = None
        self.p: G = None
        self.x: A = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: B = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: A = None
        self.p: E = None
        self.t: E = None
        self.r: A = None
        self.s: I = None
        self.o: D = None
        self.y: I = None
        self.q: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: B = None
        self.p: I = None
        self.v: H = None
        self.w: B = None
        self.u: D = None
        self.o: G = None
        self.z: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: A = None
        self.o: C = None
        self.u: H = None
        self.p: G = None
        self.x: A = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: B = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: A = None
        self.p: E = None
        self.t: E = None
        self.r: A = None
        self.s: I = None
        self.o: D = None
        self.y: I = None
        self.q: B = None
        self.txt = txt

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

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

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