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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: B = None
        self.z: G = None
        self.t: G = None
        self.v: F = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: A = None
        self.p: C = None
        self.s: F = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: B = None
        self.r: G = None
        self.y: G = None
        self.txt = txt

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

a = A("a")
l = B("l")
c = C("c")
b = D("b")
m = E("m")
d = F("d")
k = G("k")
i = A("i")

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: B = None
        self.z: G = None
        self.t: G = None
        self.v: F = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: A = None
        self.p: C = None
        self.s: F = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: B = None
        self.r: G = None
        self.y: G = None
        self.txt = txt

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

a = A("a")
l = B("l")
c = C("c")
b = D("b")
m = E("m")
d = F("d")
k = G("k")
i = A("i")

a.v = i
a.s = l
a.p = m
l.w = i
l.p = i
c.o = k
b.p = l
b.o = l
b.z = k
b.t = k
b.s = k
b.v = d
m.z = d
m.s = d
m.x = a
m.p = c
m.v = k
d.s = k
d.r = k
d.y = k
d.p = l
k.r = l
k.z = i
k.u = d
i.v = a
i.s = l
i.p = m
assert a.p.p.o.z.v.txt == "a"