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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: H = None
        self.q: B = None
        self.t: B = None
        self.x: D = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: E = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: H = None
        self.q: B = None
        self.t: B = None
        self.x: D = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: E = None
        self.o: E = None
        self.txt = txt

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

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

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