class A:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: B = None
        self.w: C = None
        self.x: A = None
        self.v: D = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

m = A("m")
b = B("b")
e = C("e")
a = D("a")
i = E("i")
f = F("f")
j = A("j")
d = E("d")

m.q = j
m.x = j
m.y = j
m.u = b
m.w = e
m.v = a
b.z = e
b.q = e
b.t = f
b.y = f
b.o = j
b.x = i
e.o = a
a.v = i
a.x = f
i.r = e
i.s = f
i.o = f
i.z = b
i.w = b
i.t = d
f.s = b
f.z = b
f.p = e
j.q = m
j.x = m
j.y = m
j.u = b
j.w = e
j.v = a
d.r = e
d.s = f
d.o = f
d.z = b
d.w = b
d.t = i
assert j.u.o.x.w.o.v.txt == "
class A:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: B = None
        self.w: C = None
        self.x: A = None
        self.v: D = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

m = A("m")
b = B("b")
e = C("e")
a = D("a")
i = E("i")
f = F("f")
j = A("j")
d = E("d")

m.q = j
m.x = j
m.y = j
m.u = b
m.w = e
m.v = a
b.z = e
b.q = e
b.t = f
b.y = f
b.o = j
b.x = i
e.o = a
a.v = i
a.x = f
i.r = e
i.s = f
i.o = f
i.z = b
i.w = b
i.t = d
f.s = b
f.z = b
f.p = e
j.q = m
j.x = m
j.y = m
j.u = b
j.w = e
j.v = a
d.r = e
d.s = f
d.o = f
d.z = b
d.w = b
d.t = i
assert j.u.o.x.w.o.v.txt == "i"