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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: C = None
        self.w: H = None
        self.txt = txt

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

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

c = A("c")
h = B("h")
m = C("m")
l = D("l")
g = E("g")
i = F("i")
b = G("b")
e = H("e")
a = B("a")

c.w = l
c.u = l
h.r = m
h.q = l
h.z = g
h.t = g
h.y = a
h.w = b
h.x = b
m.y = a
m.o = l
l.r = g
l.y = g
l.u = c
g.w = i
g.y = h
i.p = b
i.u = m
i.w = e
b.y = m
b.u = a
b.q = i
b.r = i
b.s = i
e.o = g
e.y = g
a.r = m
a.q = l
a.z = g
a.t = g
a.y = h
a.w = b
a.x = b
assert l.y.w.w.o.w.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: C = None
        self.w: H = None
        self.txt = txt

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

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

c = A("c")
h = B("h")
m = C("m")
l = D("l")
g = E("g")
i = F("i")
b = G("b")
e = H("e")
a = B("a")

c.w = l
c.u = l
h.r = m
h.q = l
h.z = g
h.t = g
h.y = a
h.w = b
h.x = b
m.y = a
m.o = l
l.r = g
l.y = g
l.u = c
g.w = i
g.y = h
i.p = b
i.u = m
i.w = e
b.y = m
b.u = a
b.q = i
b.r = i
b.s = i
e.o = g
e.y = g
a.r = m
a.q = l
a.z = g
a.t = g
a.y = h
a.w = b
a.x = b
assert l.y.w.w.o.w.txt == "i"