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

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

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

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

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

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

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

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

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

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

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

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

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

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

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