class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: B = None
        self.z: C = None
        self.v: F = None
        self.u: E = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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