class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: H = None
        self.z: F = None
        self.o: F = None
        self.y: H = None
        self.x: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: D = None
        self.s: B = None
        self.y: F = None
        self.v: F = None
        self.p: B = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: D = None
        self.s: B = None
        self.y: F = None
        self.v: F = None
        self.p: B = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

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

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