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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: D = None
        self.r: D = None
        self.x: A = None
        self.v: A = None
        self.w: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: A = None
        self.w: E = None
        self.txt = txt

j = A("j")
a = B("a")
m = C("m")
d = D("d")
i = E("i")
k = F("k")

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: D = None
        self.r: D = None
        self.x: A = None
        self.v: A = None
        self.w: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: A = None
        self.w: E = None
        self.txt = txt

j = A("j")
a = B("a")
m = C("m")
d = D("d")
i = E("i")
k = F("k")

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