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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: D = None
        self.r: C = None
        self.y: A = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: C = None
        self.x: A = None
        self.r: A = None
        self.s: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: H = None
        self.p: A = None
        self.r: D = None
        self.t: C = None
        self.q: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: D = None
        self.r: C = None
        self.y: A = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: C = None
        self.x: A = None
        self.r: A = None
        self.s: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: H = None
        self.p: A = None
        self.r: D = None
        self.t: C = None
        self.q: E = None
        self.txt = txt

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

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

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