class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: A = None
        self.t: A = None
        self.s: F = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: A = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: D = None
        self.x: A = None
        self.u: C = None
        self.o: C = None
        self.p: D = None
        self.v: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: A = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: D = None
        self.x: A = None
        self.u: C = None
        self.o: C = None
        self.p: D = None
        self.v: F = None
        self.txt = txt

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

j.z = n
j.u = n
j.v = e
j.t = e
j.s = h
f.r = d
f.x = d
k.r = n
k.q = n
k.p = h
k.y = f
k.x = f
k.v = d
d.r = h
d.u = h
d.z = j
d.o = n
d.p = a
a.y = h
a.t = h
a.q = e
h.u = j
h.o = f
n.y = a
n.t = d
n.p = d
n.x = e
n.u = k
n.o = k
n.v = h
e.z = n
e.u = n
e.v = j
e.t = j
e.s = h
assert h.o.r.z.u.y.q.s.o.txt == "f"