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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: D = None
        self.y: F = None
        self.z: F = None
        self.x: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: F = None
        self.w: C = None
        self.o: E = None
        self.y: F = None
        self.x: B = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: D = None
        self.y: F = None
        self.z: F = None
        self.x: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: F = None
        self.w: C = None
        self.o: E = None
        self.y: F = None
        self.x: B = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: C = None
        self.txt = txt

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

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