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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: H = None
        self.v: A = None
        self.r: F = None
        self.o: A = None
        self.z: A = None
        self.u: H = None
        self.t: D = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: H = None
        self.x: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: G = None
        self.r: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: H = None
        self.v: A = None
        self.r: F = None
        self.o: A = None
        self.z: A = None
        self.u: H = None
        self.t: D = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: H = None
        self.x: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: G = None
        self.r: A = None
        self.txt = txt

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

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