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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: C = None
        self.z: E = None
        self.o: F = None
        self.y: F = None
        self.r: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: C = None
        self.z: E = None
        self.o: F = None
        self.y: F = None
        self.r: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

g.u = i
g.s = l
i.x = k
i.o = k
i.y = k
i.q = n
i.r = n
i.z = c
n.z = l
n.r = b
n.y = d
n.u = g
n.w = g
n.q = k
b.y = c
b.z = g
b.o = g
b.s = g
b.v = i
b.w = n
b.p = n
c.o = g
c.q = g
c.w = d
c.u = d
c.y = l
c.r = n
k.o = i
d.z = c
l.x = k
l.o = k
l.y = k
l.q = n
l.r = n
l.z = c
assert c.r.z.z.o.txt == "g"