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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: B = None
        self.w: E = None
        self.x: A = None
        self.p: A = None
        self.t: E = None
        self.txt = txt

a = A("a")
f = B("f")
i = C("i")
l = D("l")
j = E("j")
c = F("c")
m = C("m")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: B = None
        self.w: E = None
        self.x: A = None
        self.p: A = None
        self.t: E = None
        self.txt = txt

a = A("a")
f = B("f")
i = C("i")
l = D("l")
j = E("j")
c = F("c")
m = C("m")

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