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

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

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: E = None
        self.v: A = None
        self.q: E = None
        self.y: G = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: G = None
        self.q: F = None
        self.s: B = None
        self.z: B = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: H = None
        self.v: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: F = None
        self.o: E = None
        self.z: D = None
        self.v: D = None
        self.x: A = None
        self.txt = txt

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

j = A("j")
e = B("e")
m = C("m")
h = D("h")
b = E("b")
n = F("n")
l = G("l")
g = H("g")
k = F("k")

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: E = None
        self.v: A = None
        self.q: E = None
        self.y: G = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: G = None
        self.q: F = None
        self.s: B = None
        self.z: B = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: H = None
        self.v: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: F = None
        self.o: E = None
        self.z: D = None
        self.v: D = None
        self.x: A = None
        self.txt = txt

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

j = A("j")
e = B("e")
m = C("m")
h = D("h")
b = E("b")
n = F("n")
l = G("l")
g = H("g")
k = F("k")

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