class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: D = None
        self.s: D = None
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: G = None
        self.r: C = None
        self.u: A = None
        self.y: C = None
        self.p: A = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: B = None
        self.w: G = None
        self.s: F = None
        self.t: G = None
        self.o: B = None
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: D = None
        self.x: B = None
        self.r: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: G = None
        self.r: C = None
        self.u: A = None
        self.y: C = None
        self.p: A = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: B = None
        self.w: G = None
        self.s: F = None
        self.t: G = None
        self.o: B = None
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: D = None
        self.x: B = None
        self.r: F = None
        self.txt = txt

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

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

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

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