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

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

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

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

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

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

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

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

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

b.z = a
b.r = c
b.o = e
b.u = f
b.x = m
b.y = m
b.s = g
a.r = i
a.v = c
f.t = c
f.y = e
f.p = i
f.z = i
f.o = b
f.v = m
n.z = i
n.p = a
n.t = e
n.y = c
e.x = d
e.o = d
e.q = c
e.z = c
e.r = a
e.v = n
g.p = b
g.o = m
g.x = a
g.s = a
c.r = b
m.q = g
m.y = n
m.p = b
m.s = b
m.v = d
i.t = c
i.y = e
i.p = f
i.z = f
i.o = b
i.v = m
d.r = i
d.v = c
assert d.v.r.o.o.r.y.x.v.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: G = None
        self.o: E = None
        self.u: C = None
        self.x: H = None
        self.s: F = None
        self.y: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

b.z = a
b.r = c
b.o = e
b.u = f
b.x = m
b.y = m
b.s = g
a.r = i
a.v = c
f.t = c
f.y = e
f.p = i
f.z = i
f.o = b
f.v = m
n.z = i
n.p = a
n.t = e
n.y = c
e.x = d
e.o = d
e.q = c
e.z = c
e.r = a
e.v = n
g.p = b
g.o = m
g.x = a
g.s = a
c.r = b
m.q = g
m.y = n
m.p = b
m.s = b
m.v = d
i.t = c
i.y = e
i.p = f
i.z = f
i.o = b
i.v = m
d.r = i
d.v = c
assert d.v.r.o.o.r.y.x.v.txt == "c"