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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: B = None
        self.s: D = None
        self.u: D = None
        self.w: E = None
        self.q: G = None
        self.x: B = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: B = None
        self.s: D = None
        self.u: D = None
        self.w: E = None
        self.q: G = None
        self.x: B = None
        self.txt = txt

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

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

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