class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: F = None
        self.t: F = None
        self.y: C = None
        self.r: D = None
        self.u: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: E = None
        self.y: A = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: F = None
        self.v: A = None
        self.y: C = None
        self.u: A = None
        self.txt = txt

m = A("m")
e = B("e")
j = C("j")
k = D("k")
h = E("h")
l = F("l")
g = G("g")
n = G("n")
a = F("a")
b = G("b")

m.s = j
m.y = j
m.z = a
m.t = a
m.r = k
m.u = e
e.v = m
e.q = m
e.w = l
j.s = e
k.o = l
k.v = h
k.q = h
k.y = m
h.q = b
l.r = m
l.v = h
l.s = j
g.p = h
g.r = a
g.v = m
g.u = m
g.y = j
n.p = h
n.r = l
n.v = m
n.u = m
n.y = j
a.r = m
a.v = h
a.s = j
b.p = h
b.r = l
b.v = m
b.u = m
b.y = j
assert l.v.q.p.q.v.u.w.v.q.v.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: F = None
        self.t: F = None
        self.y: C = None
        self.r: D = None
        self.u: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: E = None
        self.y: A = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: F = None
        self.v: A = None
        self.y: C = None
        self.u: A = None
        self.txt = txt

m = A("m")
e = B("e")
j = C("j")
k = D("k")
h = E("h")
l = F("l")
g = G("g")
n = G("n")
a = F("a")
b = G("b")

m.s = j
m.y = j
m.z = a
m.t = a
m.r = k
m.u = e
e.v = m
e.q = m
e.w = l
j.s = e
k.o = l
k.v = h
k.q = h
k.y = m
h.q = b
l.r = m
l.v = h
l.s = j
g.p = h
g.r = a
g.v = m
g.u = m
g.y = j
n.p = h
n.r = l
n.v = m
n.u = m
n.y = j
a.r = m
a.v = h
a.s = j
b.p = h
b.r = l
b.v = m
b.u = m
b.y = j
assert l.v.q.p.q.v.u.w.v.q.v.txt == "m"