class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: C = None
        self.z: C = None
        self.r: F = None
        self.q: E = None
        self.x: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

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

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

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