class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: A = None
        self.v: B = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: G = None
        self.u: A = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

f.u = m
f.z = m
d.z = e
d.q = e
d.v = l
d.w = l
d.x = f
d.y = g
d.t = g
g.r = e
g.z = l
n.r = j
e.z = n
e.t = l
j.p = k
j.o = f
j.v = d
j.z = g
a.w = k
a.p = k
a.u = f
a.t = f
l.y = j
k.w = a
k.p = a
k.u = f
k.t = f
m.r = e
m.z = l
assert n.r.o.u.z.y.p.w.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: A = None
        self.v: B = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: G = None
        self.u: A = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

f.u = m
f.z = m
d.z = e
d.q = e
d.v = l
d.w = l
d.x = f
d.y = g
d.t = g
g.r = e
g.z = l
n.r = j
e.z = n
e.t = l
j.p = k
j.o = f
j.v = d
j.z = g
a.w = k
a.p = k
a.u = f
a.t = f
l.y = j
k.w = a
k.p = a
k.u = f
k.t = f
m.r = e
m.z = l
assert n.r.o.u.z.y.p.w.txt == "a"