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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

m.u = i
m.v = k
c.q = i
c.y = i
c.s = i
c.o = i
c.p = l
c.w = d
c.v = d
l.u = m
l.s = k
l.w = k
l.z = b
l.o = i
g.o = b
g.v = j
b.z = m
i.z = l
j.w = b
j.q = b
j.z = i
j.p = l
k.u = i
k.v = m
f.u = k
f.s = k
f.w = k
f.z = b
f.o = i
d.o = b
d.v = j
assert l.s.v.u.z.o.z.o.z.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: A = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

m.u = i
m.v = k
c.q = i
c.y = i
c.s = i
c.o = i
c.p = l
c.w = d
c.v = d
l.u = m
l.s = k
l.w = k
l.z = b
l.o = i
g.o = b
g.v = j
b.z = m
i.z = l
j.w = b
j.q = b
j.z = i
j.p = l
k.u = i
k.v = m
f.u = k
f.s = k
f.w = k
f.z = b
f.o = i
d.o = b
d.v = j
assert l.s.v.u.z.o.z.o.z.z.z.txt == "m"