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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: G = None
        self.q: A = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: B = None
        self.p: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: G = None
        self.q: A = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: B = None
        self.p: A = None
        self.txt = txt

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

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

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