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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: G = None
        self.x: G = None
        self.t: D = None
        self.y: A = None
        self.q: A = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: F = None
        self.s: G = None
        self.o: F = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: A = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: G = None
        self.v: G = None
        self.x: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: G = None
        self.x: G = None
        self.t: D = None
        self.y: A = None
        self.q: A = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: F = None
        self.s: G = None
        self.o: F = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: A = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: G = None
        self.v: G = None
        self.x: A = None
        self.txt = txt

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

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

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

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