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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: D = None
        self.y: A = None
        self.v: E = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: D = None
        self.x: E = None
        self.u: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: A = None
        self.txt = txt

c = A("c")
i = B("i")
a = C("a")
d = D("d")
g = E("g")
k = F("k")
j = E("j")

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: D = None
        self.y: A = None
        self.v: E = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: D = None
        self.x: E = None
        self.u: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: A = None
        self.txt = txt

c = A("c")
i = B("i")
a = C("a")
d = D("d")
g = E("g")
k = F("k")
j = E("j")

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