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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: C = None
        self.o: E = None
        self.t: C = None
        self.q: H = None
        self.z: D = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: D = None
        self.v: F = None
        self.o: F = None
        self.t: G = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: F = None
        self.u: C = None
        self.r: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: E = None
        self.t: A = None
        self.v: B = None
        self.y: C = None
        self.r: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: C = None
        self.o: E = None
        self.t: C = None
        self.q: H = None
        self.z: D = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: D = None
        self.v: F = None
        self.o: F = None
        self.t: G = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: F = None
        self.u: C = None
        self.r: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: E = None
        self.t: A = None
        self.v: B = None
        self.y: C = None
        self.r: B = None
        self.txt = txt

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

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