class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: B = None
        self.x: H = None
        self.z: B = None
        self.u: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: A = None
        self.z: A = None
        self.y: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: A = None
        self.u: C = None
        self.x: C = None
        self.r: H = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: D = None
        self.z: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: A = None
        self.z: A = None
        self.y: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: A = None
        self.u: C = None
        self.x: C = None
        self.r: H = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: D = None
        self.z: C = None
        self.txt = txt

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

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