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

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

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: F = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: B = None
        self.u: B = None
        self.s: B = None
        self.p: D = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: F = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: B = None
        self.u: B = None
        self.s: B = None
        self.p: D = None
        self.t: B = None
        self.txt = txt

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

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

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

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