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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: G = None
        self.y: G = None
        self.x: F = None
        self.t: A = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: F = None
        self.q: D = None
        self.w: E = None
        self.s: H = None
        self.x: H = None
        self.t: B = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: H = None
        self.x: B = None
        self.w: D = None
        self.s: F = None
        self.p: C = None
        self.z: A = None
        self.r: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: H = None
        self.z: C = None
        self.q: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: G = None
        self.y: G = None
        self.x: F = None
        self.t: A = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: F = None
        self.q: D = None
        self.w: E = None
        self.s: H = None
        self.x: H = None
        self.t: B = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: H = None
        self.x: B = None
        self.w: D = None
        self.s: F = None
        self.p: C = None
        self.z: A = None
        self.r: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: H = None
        self.z: C = None
        self.q: C = None
        self.txt = txt

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

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

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