class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: B = None
        self.w: H = None
        self.z: B = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: D = None
        self.w: G = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: B = None
        self.w: H = None
        self.z: B = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: D = None
        self.w: G = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: D = None
        self.txt = txt

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

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

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