class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: H = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: F = None
        self.v: H = None
        self.y: F = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: F = None
        self.w: F = None
        self.q: D = None
        self.y: C = None
        self.t: H = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: E = None
        self.t: E = None
        self.o: G = None
        self.r: F = None
        self.v: G = None
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: F = None
        self.v: H = None
        self.y: F = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: F = None
        self.w: F = None
        self.q: D = None
        self.y: C = None
        self.t: H = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: E = None
        self.t: E = None
        self.o: G = None
        self.r: F = None
        self.v: G = None
        self.z: A = None
        self.txt = txt

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

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