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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: H = None
        self.o: I = None
        self.w: D = None
        self.z: F = None
        self.u: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: A = None
        self.p: B = None
        self.q: F = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: A = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

n = A("n")
i = B("i")
g = C("g")
m = D("m")
c = E("c")
k = F("k")
f = G("f")
h = H("h")
b = I("b")
l = F("l")

n.w = c
i.z = n
i.y = b
g.q = c
g.u = c
g.y = h
g.o = b
g.w = m
g.z = l
m.x = l
m.s = g
m.w = i
m.t = c
c.w = m
c.x = m
c.q = b
c.t = n
c.y = n
c.z = n
c.u = h
c.o = h
c.r = f
k.q = h
k.t = b
k.v = n
f.w = g
f.z = n
f.p = i
f.q = l
f.s = k
h.v = c
h.q = c
h.r = n
b.y = c
l.q = h
l.t = b
l.v = n
assert m.w.z.w.o.v.z.w.w.s.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: H = None
        self.o: I = None
        self.w: D = None
        self.z: F = None
        self.u: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: A = None
        self.p: B = None
        self.q: F = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: A = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

n = A("n")
i = B("i")
g = C("g")
m = D("m")
c = E("c")
k = F("k")
f = G("f")
h = H("h")
b = I("b")
l = F("l")

n.w = c
i.z = n
i.y = b
g.q = c
g.u = c
g.y = h
g.o = b
g.w = m
g.z = l
m.x = l
m.s = g
m.w = i
m.t = c
c.w = m
c.x = m
c.q = b
c.t = n
c.y = n
c.z = n
c.u = h
c.o = h
c.r = f
k.q = h
k.t = b
k.v = n
f.w = g
f.z = n
f.p = i
f.q = l
f.s = k
h.v = c
h.q = c
h.r = n
b.y = c
l.q = h
l.t = b
l.v = n
assert m.w.z.w.o.v.z.w.w.s.txt == "g"