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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: C = None
        self.y: C = None
        self.u: C = None
        self.t: D = None
        self.r: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: E = None
        self.v: I = None
        self.z: A = None
        self.w: H = None
        self.t: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: E = None
        self.v: D = None
        self.q: G = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: C = None
        self.y: C = None
        self.u: C = None
        self.t: D = None
        self.r: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: E = None
        self.v: I = None
        self.z: A = None
        self.w: H = None
        self.t: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: E = None
        self.v: D = None
        self.q: G = None
        self.p: C = None
        self.txt = txt

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

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