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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: F = None
        self.u: A = None
        self.z: G = None
        self.x: C = None
        self.t: B = None
        self.w: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: A = None
        self.p: C = None
        self.s: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: G = None
        self.o: G = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: E = None
        self.q: E = None
        self.x: A = None
        self.w: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: F = None
        self.u: A = None
        self.z: G = None
        self.x: C = None
        self.t: B = None
        self.w: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: A = None
        self.p: C = None
        self.s: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: G = None
        self.o: G = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: E = None
        self.q: E = None
        self.x: A = None
        self.w: A = None
        self.txt = txt

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

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