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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: F = None
        self.w: E = None
        self.q: B = None
        self.u: D = None
        self.z: D = None
        self.txt = txt

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

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

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

i = A("i")
e = B("e")
g = C("g")
j = D("j")
k = E("k")
l = F("l")

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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: F = None
        self.w: E = None
        self.q: B = None
        self.u: D = None
        self.z: D = None
        self.txt = txt

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

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

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

i = A("i")
e = B("e")
g = C("g")
j = D("j")
k = E("k")
l = F("l")

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