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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: H = None
        self.y: C = None
        self.w: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: B = None
        self.u: B = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: A = None
        self.u: A = None
        self.v: H = None
        self.txt = txt

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

i = A("i")
d = B("d")
n = C("n")
k = D("k")
c = E("c")
f = F("f")
g = G("g")
j = H("j")
m = G("m")
l = H("l")

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: H = None
        self.y: C = None
        self.w: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: B = None
        self.u: B = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: A = None
        self.u: A = None
        self.v: H = None
        self.txt = txt

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

i = A("i")
d = B("d")
n = C("n")
k = D("k")
c = E("c")
f = F("f")
g = G("g")
j = H("j")
m = G("m")
l = H("l")

i.z = f
i.r = d
i.w = c
i.v = c
i.s = g
i.t = l
d.u = c
d.t = l
d.y = n
d.w = f
n.t = m
n.s = k
n.w = k
n.y = i
n.v = f
n.p = f
n.q = c
n.r = d
k.p = d
k.s = i
k.x = j
k.z = j
k.q = n
c.q = f
c.u = j
f.r = i
f.s = i
f.q = d
f.u = d
g.p = i
g.q = i
g.u = i
g.v = l
j.v = k
j.w = i
j.z = c
m.p = i
m.q = i
m.u = i
m.v = l
l.v = k
l.w = i
l.z = c
assert n.p.r.t.w.t.v.s.z.txt == "f"