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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: A = None
        self.y: E = None
        self.s: E = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: F = None
        self.s: G = None
        self.y: F = None
        self.u: A = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: E = None
        self.o: B = None
        self.p: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: A = None
        self.y: E = None
        self.s: E = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: F = None
        self.s: G = None
        self.y: F = None
        self.u: A = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: E = None
        self.o: B = None
        self.p: D = None
        self.txt = txt

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

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