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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: E = None
        self.y: A = None
        self.p: B = None
        self.x: B = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: E = None
        self.y: A = None
        self.p: B = None
        self.x: B = None
        self.txt = txt

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

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

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

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

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