class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: C = None
        self.p: C = None
        self.r: E = None
        self.v: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: C = None
        self.x: C = None
        self.q: F = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: C = None
        self.x: C = None
        self.q: F = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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