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

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: F = None
        self.x: F = None
        self.w: G = None
        self.v: H = None
        self.r: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: D = None
        self.y: H = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: C = None
        self.r: C = None
        self.t: A = None
        self.o: B = None
        self.s: A = None
        self.w: C = None
        self.p: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: F = None
        self.x: F = None
        self.w: G = None
        self.v: H = None
        self.r: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: D = None
        self.y: H = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: C = None
        self.r: C = None
        self.t: A = None
        self.o: B = None
        self.s: A = None
        self.w: C = None
        self.p: F = None
        self.txt = txt

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

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