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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: F = None
        self.u: A = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: C = None
        self.w: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: B = None
        self.z: E = None
        self.v: E = None
        self.txt = txt

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

k.r = d
g.z = l
g.t = d
i.v = a
i.p = g
l.p = a
l.t = f
l.u = k
l.z = c
c.w = f
c.z = f
c.v = l
f.t = k
f.v = i
f.w = m
a.u = f
a.p = f
a.v = i
a.q = l
n.u = c
n.z = c
n.v = c
n.w = m
m.z = l
m.t = d
d.w = f
d.z = f
d.v = l
assert c.v.t.t.r.w.v.p.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: F = None
        self.u: A = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: C = None
        self.w: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: B = None
        self.z: E = None
        self.v: E = None
        self.txt = txt

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

k.r = d
g.z = l
g.t = d
i.v = a
i.p = g
l.p = a
l.t = f
l.u = k
l.z = c
c.w = f
c.z = f
c.v = l
f.t = k
f.v = i
f.w = m
a.u = f
a.p = f
a.v = i
a.q = l
n.u = c
n.z = c
n.v = c
n.w = m
m.z = l
m.t = d
d.w = f
d.z = f
d.v = l
assert c.v.t.t.r.w.v.p.z.z.txt == "c"