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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: E = None
        self.u: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: D = None
        self.q: C = None
        self.p: C = None
        self.txt = txt

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

m.z = b
m.o = l
m.u = d
f.r = m
f.w = l
f.u = h
h.r = f
d.q = k
d.r = m
g.u = f
g.p = h
g.s = b
g.v = b
g.r = b
g.q = k
g.w = k
a.r = k
a.v = l
a.p = l
a.z = m
a.q = f
a.w = h
k.s = b
k.o = d
k.q = h
k.p = h
b.z = m
b.o = l
b.u = d
c.s = m
c.o = d
c.q = h
c.p = h
l.u = f
l.p = h
l.s = m
l.r = m
l.v = b
l.q = k
l.w = k
assert f.u.r.w.v.u.r.o.txt == "
class A:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: E = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: E = None
        self.u: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: D = None
        self.q: C = None
        self.p: C = None
        self.txt = txt

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

m.z = b
m.o = l
m.u = d
f.r = m
f.w = l
f.u = h
h.r = f
d.q = k
d.r = m
g.u = f
g.p = h
g.s = b
g.v = b
g.r = b
g.q = k
g.w = k
a.r = k
a.v = l
a.p = l
a.z = m
a.q = f
a.w = h
k.s = b
k.o = d
k.q = h
k.p = h
b.z = m
b.o = l
b.u = d
c.s = m
c.o = d
c.q = h
c.p = h
l.u = f
l.p = h
l.s = m
l.r = m
l.v = b
l.q = k
l.w = k
assert f.u.r.w.v.u.r.o.txt == "l"