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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: D = None
        self.p: G = None
        self.o: D = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: A = None
        self.o: A = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: D = None
        self.p: G = None
        self.o: D = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: A = None
        self.o: A = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: B = None
        self.txt = txt

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

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