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

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

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

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

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

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

c = A("c")
i = B("i")
j = C("j")
m = D("m")
e = E("e")
a = F("a")
l = A("l")
f = F("f")
b = A("b")

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

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

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

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

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

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

c = A("c")
i = B("i")
j = C("j")
m = D("m")
e = E("e")
a = F("a")
l = A("l")
f = F("f")
b = A("b")

c.v = j
c.s = f
c.u = i
i.s = a
i.q = m
j.z = m
j.u = l
j.r = e
m.p = e
m.w = e
m.z = j
e.o = c
e.x = i
a.x = i
l.v = j
l.s = a
l.u = i
f.x = i
b.v = j
b.s = a
b.u = i
assert c.v.z.z.txt == "j"