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

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: G = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: G = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

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