class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: C = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: F = None
        self.o: A = None
        self.u: F = None
        self.w: D = None
        self.r: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: B = None
        self.o: E = None
        self.y: B = None
        self.p: B = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: F = None
        self.z: C = None
        self.r: H = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: B = None
        self.r: A = None
        self.y: C = None
        self.x: D = None
        self.txt = txt

c = A("c")
b = B("b")
k = C("k")
g = D("g")
m = E("m")
d = F("d")
e = G("e")
j = H("j")
a = E("a")

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: C = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: F = None
        self.o: A = None
        self.u: F = None
        self.w: D = None
        self.r: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: B = None
        self.o: E = None
        self.y: B = None
        self.p: B = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: F = None
        self.z: C = None
        self.r: H = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: B = None
        self.r: A = None
        self.y: C = None
        self.x: D = None
        self.txt = txt

c = A("c")
b = B("b")
k = C("k")
g = D("g")
m = E("m")
d = F("d")
e = G("e")
j = H("j")
a = E("a")

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