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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: D = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: B = None
        self.z: C = None
        self.x: D = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: H = None
        self.o: A = None
        self.q: C = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: B = None
        self.v: E = None
        self.txt = txt

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

j = A("j")
f = B("f")
i = C("i")
c = D("c")
n = E("n")
h = F("h")
d = G("d")
e = H("e")

j.s = f
j.q = i
j.r = i
j.w = d
f.x = e
i.z = e
i.r = c
i.o = n
c.o = i
c.z = d
c.q = n
c.p = n
c.u = e
c.r = e
c.w = h
n.w = h
n.u = f
n.z = i
n.x = c
n.v = e
h.y = f
h.w = e
h.o = j
h.q = i
h.p = i
d.y = e
d.p = f
d.v = n
e.v = i
assert j.w.y.v.r.p.w.p.o.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: C = None
        self.r: C = None
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: D = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: B = None
        self.z: C = None
        self.x: D = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: H = None
        self.o: A = None
        self.q: C = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: B = None
        self.v: E = None
        self.txt = txt

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

j = A("j")
f = B("f")
i = C("i")
c = D("c")
n = E("n")
h = F("h")
d = G("d")
e = H("e")

j.s = f
j.q = i
j.r = i
j.w = d
f.x = e
i.z = e
i.r = c
i.o = n
c.o = i
c.z = d
c.q = n
c.p = n
c.u = e
c.r = e
c.w = h
n.w = h
n.u = f
n.z = i
n.x = c
n.v = e
h.y = f
h.w = e
h.o = j
h.q = i
h.p = i
d.y = e
d.p = f
d.v = n
e.v = i
assert j.w.y.v.r.p.w.p.o.txt == "n"