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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: F = None
        self.v: F = None
        self.p: E = None
        self.z: H = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: F = None
        self.v: F = None
        self.p: E = None
        self.z: H = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: D = None
        self.txt = txt

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

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

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