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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: F = None
        self.u: C = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: F = None
        self.r: G = None
        self.p: B = None
        self.v: H = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: A = None
        self.x: B = None
        self.y: D = None
        self.p: A = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: D = None
        self.o: H = None
        self.x: D = None
        self.w: E = None
        self.u: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: F = None
        self.q: G = None
        self.y: E = None
        self.w: G = None
        self.u: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: F = None
        self.u: C = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: F = None
        self.r: G = None
        self.p: B = None
        self.v: H = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: A = None
        self.x: B = None
        self.y: D = None
        self.p: A = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: D = None
        self.o: H = None
        self.x: D = None
        self.w: E = None
        self.u: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: F = None
        self.q: G = None
        self.y: E = None
        self.w: G = None
        self.u: A = None
        self.txt = txt

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

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