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

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

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

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

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

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

j = A("j")
i = B("i")
k = C("k")
a = D("a")
h = E("h")
f = F("f")
b = A("b")

j.z = i
j.y = i
j.s = b
j.u = f
j.o = h
i.s = h
i.z = h
i.u = f
i.w = k
k.p = b
a.w = k
a.v = h
h.s = b
f.x = a
f.z = a
f.q = i
b.z = i
b.y = i
b.s = j
b.u = f
b.o = h
assert j.o.s.s.s.u.q.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: A = None
        self.u: F = None
        self.y: B = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

j = A("j")
i = B("i")
k = C("k")
a = D("a")
h = E("h")
f = F("f")
b = A("b")

j.z = i
j.y = i
j.s = b
j.u = f
j.o = h
i.s = h
i.z = h
i.u = f
i.w = k
k.p = b
a.w = k
a.v = h
h.s = b
f.x = a
f.z = a
f.q = i
b.z = i
b.y = i
b.s = j
b.u = f
b.o = h
assert j.o.s.s.s.u.q.txt == "i"