class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: C = None
        self.u: H = None
        self.x: F = None
        self.q: H = None
        self.v: C = None
        self.o: G = None
        self.t: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: G = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: H = None
        self.o: C = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: A = None
        self.o: C = None
        self.y: A = None
        self.q: D = None
        self.v: C = None
        self.w: G = None
        self.r: E = None
        self.txt = txt

i = A("i")
f = B("f")
n = C("n")
e = D("e")
m = E("m")
k = F("k")
c = G("c")
g = H("g")
l = C("l")

i.r = k
i.x = k
i.s = l
i.v = l
i.u = g
i.q = g
i.o = c
i.t = m
f.s = e
f.w = i
n.y = f
n.x = k
n.z = m
n.t = e
n.q = i
e.q = f
e.s = f
e.u = c
m.z = f
m.y = i
k.s = m
k.q = g
k.o = l
k.y = e
c.z = e
g.t = f
g.u = i
g.y = i
g.o = n
g.q = e
g.v = l
g.w = c
g.r = m
l.y = f
l.x = k
l.z = m
l.t = e
l.q = i
assert f.w.x.y.s.w.t.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: C = None
        self.u: H = None
        self.x: F = None
        self.q: H = None
        self.v: C = None
        self.o: G = None
        self.t: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: G = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: H = None
        self.o: C = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: A = None
        self.o: C = None
        self.y: A = None
        self.q: D = None
        self.v: C = None
        self.w: G = None
        self.r: E = None
        self.txt = txt

i = A("i")
f = B("f")
n = C("n")
e = D("e")
m = E("m")
k = F("k")
c = G("c")
g = H("g")
l = C("l")

i.r = k
i.x = k
i.s = l
i.v = l
i.u = g
i.q = g
i.o = c
i.t = m
f.s = e
f.w = i
n.y = f
n.x = k
n.z = m
n.t = e
n.q = i
e.q = f
e.s = f
e.u = c
m.z = f
m.y = i
k.s = m
k.q = g
k.o = l
k.y = e
c.z = e
g.t = f
g.u = i
g.y = i
g.o = n
g.q = e
g.v = l
g.w = c
g.r = m
l.y = f
l.x = k
l.z = m
l.t = e
l.q = i
assert f.w.x.y.s.w.t.txt == "m"