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

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: A = None
        self.y: D = None
        self.txt = txt

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

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

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

n.y = b
n.u = i
n.t = i
n.q = m
n.x = c
n.o = k
c.z = e
c.s = m
c.x = m
c.r = n
c.w = i
c.v = k
l.v = c
l.o = e
l.x = m
i.y = e
e.r = m
e.o = n
e.y = i
m.o = k
k.z = c
b.v = c
b.o = e
b.x = m
assert l.o.o.x.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: D = None
        self.q: F = None
        self.x: B = None
        self.o: G = None
        self.t: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: A = None
        self.y: D = None
        self.txt = txt

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

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

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

n.y = b
n.u = i
n.t = i
n.q = m
n.x = c
n.o = k
c.z = e
c.s = m
c.x = m
c.r = n
c.w = i
c.v = k
l.v = c
l.o = e
l.x = m
i.y = e
e.r = m
e.o = n
e.y = i
m.o = k
k.z = c
b.v = c
b.o = e
b.x = m
assert l.o.o.x.txt == "c"