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

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

class C:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: F = None
        self.y: E = None
        self.r: C = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: H = None
        self.r: B = None
        self.w: C = None
        self.v: B = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: A = None
        self.o: D = None
        self.x: H = None
        self.r: A = None
        self.p: B = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: E = None
        self.s: B = None
        self.q: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: F = None
        self.y: E = None
        self.r: C = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: H = None
        self.r: B = None
        self.w: C = None
        self.v: B = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: A = None
        self.o: D = None
        self.x: H = None
        self.r: A = None
        self.p: B = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: E = None
        self.s: B = None
        self.q: A = None
        self.txt = txt

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

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

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