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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: C = None
        self.s: D = None
        self.v: E = None
        self.t: B = None
        self.y: C = None
        self.txt = txt

l = A("l")
f = B("f")
j = C("j")
i = D("i")
g = E("g")
n = F("n")
a = G("a")
k = G("k")

l.z = i
l.v = j
l.t = f
l.y = g
f.s = j
f.v = g
j.y = f
j.p = i
i.t = f
i.u = l
i.z = g
g.s = n
n.p = i
n.v = j
n.q = g
n.y = g
n.u = l
n.o = k
n.x = f
a.o = f
a.t = f
a.u = j
a.y = j
a.s = i
a.v = g
k.o = f
k.t = f
k.u = j
k.y = j
k.s = i
k.v = g
assert l.v.p.t.s.p.u.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: C = None
        self.t: B = None
        self.y: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: C = None
        self.s: D = None
        self.v: E = None
        self.t: B = None
        self.y: C = None
        self.txt = txt

l = A("l")
f = B("f")
j = C("j")
i = D("i")
g = E("g")
n = F("n")
a = G("a")
k = G("k")

l.z = i
l.v = j
l.t = f
l.y = g
f.s = j
f.v = g
j.y = f
j.p = i
i.t = f
i.u = l
i.z = g
g.s = n
n.p = i
n.v = j
n.q = g
n.y = g
n.u = l
n.o = k
n.x = f
a.o = f
a.t = f
a.u = j
a.y = j
a.s = i
a.v = g
k.o = f
k.t = f
k.u = j
k.y = j
k.s = i
k.v = g
assert l.v.p.t.s.p.u.txt == "l"