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

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

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

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

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

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

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

e.v = a
e.s = a
e.u = j
e.t = j
c.v = j
c.x = g
a.z = i
a.s = g
j.s = g
j.v = g
j.t = g
g.t = i
g.x = e
i.v = g
i.u = a
i.y = a
i.r = j
assert e.s.s.x.t.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: D = None
        self.s: C = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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

e.v = a
e.s = a
e.u = j
e.t = j
c.v = j
c.x = g
a.z = i
a.s = g
j.s = g
j.v = g
j.t = g
g.t = i
g.x = e
i.v = g
i.u = a
i.y = a
i.r = j
assert e.s.s.x.t.txt == "j"