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

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

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

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

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

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

j = A("j")
f = B("f")
g = C("g")
m = D("m")
i = E("i")
l = F("l")

j.s = i
j.v = l
f.r = g
f.y = l
f.s = l
f.u = i
g.y = m
g.w = f
g.z = i
g.x = i
g.t = j
g.r = l
m.q = j
m.s = g
i.y = g
i.p = g
i.v = f
i.x = m
l.s = m
assert i.y.t.v.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

j = A("j")
f = B("f")
g = C("g")
m = D("m")
i = E("i")
l = F("l")

j.s = i
j.v = l
f.r = g
f.y = l
f.s = l
f.u = i
g.y = m
g.w = f
g.z = i
g.x = i
g.t = j
g.r = l
m.q = j
m.s = g
i.y = g
i.p = g
i.v = f
i.x = m
l.s = m
assert i.y.t.v.txt == "l"