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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

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

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

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

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

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