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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: E = None
        self.u: B = None
        self.s: D = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: G = None
        self.x: C = None
        self.z: B = None
        self.t: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: G = None
        self.s: F = None
        self.q: A = None
        self.txt = txt

j = A("j")
i = B("i")
f = C("f")
g = D("g")
e = E("e")
c = F("c")
b = G("b")
m = H("m")
h = G("h")

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: E = None
        self.u: B = None
        self.s: D = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: G = None
        self.x: C = None
        self.z: B = None
        self.t: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: G = None
        self.s: F = None
        self.q: A = None
        self.txt = txt

j = A("j")
i = B("i")
f = C("f")
g = D("g")
e = E("e")
c = F("c")
b = G("b")
m = H("m")
h = G("h")

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