class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: H = None
        self.t: B = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: H = None
        self.t: B = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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