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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: F = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

i.w = j
i.s = j
i.z = a
i.t = b
b.u = c
b.t = k
b.z = a
j.y = m
j.v = m
l.v = k
m.v = k
k.s = m
a.w = j
a.s = j
a.z = i
a.t = b
c.v = k
g.u = c
g.t = k
g.z = i
assert a.t.z.t.u.v.s.v.s.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: A = None
        self.t: B = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: F = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

i.w = j
i.s = j
i.z = a
i.t = b
b.u = c
b.t = k
b.z = a
j.y = m
j.v = m
l.v = k
m.v = k
k.s = m
a.w = j
a.s = j
a.z = i
a.t = b
c.v = k
g.u = c
g.t = k
g.z = i
assert a.t.z.t.u.v.s.v.s.txt == "m"