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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: C = None
        self.r: A = None
        self.o: A = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: G = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: C = None
        self.r: A = None
        self.o: A = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: G = None
        self.txt = txt

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

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

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

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

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