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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: E = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: G = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: D = None
        self.w: C = None
        self.v: B = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: B = None
        self.y: D = None
        self.w: E = None
        self.u: C = None
        self.z: B = None
        self.txt = txt

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

c = A("c")
l = B("l")
e = C("e")
g = D("g")
h = E("h")
f = F("f")
m = G("m")
a = E("a")
n = C("n")

c.x = m
c.r = l
l.u = n
e.r = f
e.z = h
e.s = m
g.z = e
g.x = m
g.u = m
h.t = m
h.z = g
h.w = e
h.v = l
h.u = f
f.o = g
f.y = g
f.r = l
f.z = l
f.w = h
f.u = e
m.q = e
m.x = n
m.v = c
a.t = m
a.z = g
a.w = e
a.v = l
a.u = f
n.r = f
n.z = a
n.s = m
assert e.s.v.r.u.s.q.r.txt == "
class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: E = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: G = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: D = None
        self.w: C = None
        self.v: B = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: B = None
        self.y: D = None
        self.w: E = None
        self.u: C = None
        self.z: B = None
        self.txt = txt

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

c = A("c")
l = B("l")
e = C("e")
g = D("g")
h = E("h")
f = F("f")
m = G("m")
a = E("a")
n = C("n")

c.x = m
c.r = l
l.u = n
e.r = f
e.z = h
e.s = m
g.z = e
g.x = m
g.u = m
h.t = m
h.z = g
h.w = e
h.v = l
h.u = f
f.o = g
f.y = g
f.r = l
f.z = l
f.w = h
f.u = e
m.q = e
m.x = n
m.v = c
a.t = m
a.z = g
a.w = e
a.v = l
a.u = f
n.r = f
n.z = a
n.s = m
assert e.s.v.r.u.s.q.r.txt == "f"