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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: G = None
        self.w: D = None
        self.r: D = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: C = None
        self.w: B = None
        self.y: C = None
        self.o: H = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: D = None
        self.s: A = None
        self.q: G = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: G = None
        self.w: D = None
        self.r: D = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: C = None
        self.w: B = None
        self.y: C = None
        self.o: H = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: D = None
        self.s: A = None
        self.q: G = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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