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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: D = None
        self.o: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: D = None
        self.o: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: A = None
        self.txt = txt

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

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

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