class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: E = None
        self.v: A = None
        self.u: B = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: D = None
        self.x: D = None
        self.o: E = None
        self.s: A = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: G = None
        self.q: E = None
        self.v: C = None
        self.o: B = None
        self.p: E = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: C = None
        self.q: C = None
        self.s: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: D = None
        self.x: D = None
        self.o: E = None
        self.s: A = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: G = None
        self.q: E = None
        self.v: C = None
        self.o: B = None
        self.p: E = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: C = None
        self.q: C = None
        self.s: F = None
        self.txt = txt

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

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