class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: F = None
        self.s: E = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: B = None
        self.v: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: A = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: C = None
        self.txt = txt

l = A("l")
a = B("a")
e = C("e")
g = D("g")
k = E("k")
m = F("m")
c = G("c")

l.u = m
l.q = m
l.s = k
l.o = c
a.u = g
a.q = m
e.s = a
e.w = a
e.v = c
g.q = k
g.w = k
g.o = a
g.z = a
k.z = m
k.y = g
k.o = l
m.v = l
m.q = l
m.o = g
c.x = k
c.t = e
assert l.q.v.o.t.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: F = None
        self.s: E = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: B = None
        self.v: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: A = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: C = None
        self.txt = txt

l = A("l")
a = B("a")
e = C("e")
g = D("g")
k = E("k")
m = F("m")
c = G("c")

l.u = m
l.q = m
l.s = k
l.o = c
a.u = g
a.q = m
e.s = a
e.w = a
e.v = c
g.q = k
g.w = k
g.o = a
g.z = a
k.z = m
k.y = g
k.o = l
m.v = l
m.q = l
m.o = g
c.x = k
c.t = e
assert l.q.v.o.t.s.txt == "a"