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

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

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

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

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

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

b = A("b")
f = B("f")
k = C("k")
n = D("n")
j = E("j")
d = F("d")

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

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

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

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

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

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

b = A("b")
f = B("f")
k = C("k")
n = D("n")
j = E("j")
d = F("d")

b.x = n
b.u = n
b.r = f
b.z = k
b.y = k
f.y = k
k.z = d
k.y = b
k.o = n
k.r = j
n.y = d
n.v = d
n.z = j
j.w = k
j.t = k
j.s = n
j.x = f
j.z = d
d.r = n
d.x = n
assert j.x.y.y.txt == "b"