class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: B = None
        self.u: D = None
        self.r: F = None
        self.o: B = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: E = None
        self.z: G = None
        self.p: B = None
        self.u: A = None
        self.txt = txt

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

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

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

l = A("l")
h = B("h")
g = C("g")
c = D("c")
j = E("j")
m = F("m")
d = G("d")
e = G("e")
i = D("i")
k = E("k")

l.v = m
l.u = g
h.q = i
h.p = i
h.o = c
h.s = c
h.w = c
h.v = l
g.p = j
g.s = h
g.o = h
g.u = i
g.r = m
g.x = m
c.s = h
c.p = h
c.q = j
c.z = d
c.u = l
j.q = h
j.o = k
m.y = c
m.o = d
m.t = l
d.o = c
d.w = j
d.y = j
d.r = g
d.p = g
d.q = h
d.t = k
e.o = c
e.w = k
e.t = k
e.y = j
e.r = g
e.p = g
e.q = h
i.s = h
i.p = h
i.q = k
i.z = e
i.u = l
k.q = h
k.o = j
assert j.q.v.v.t.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: B = None
        self.u: D = None
        self.r: F = None
        self.o: B = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: E = None
        self.z: G = None
        self.p: B = None
        self.u: A = None
        self.txt = txt

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

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

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

l = A("l")
h = B("h")
g = C("g")
c = D("c")
j = E("j")
m = F("m")
d = G("d")
e = G("e")
i = D("i")
k = E("k")

l.v = m
l.u = g
h.q = i
h.p = i
h.o = c
h.s = c
h.w = c
h.v = l
g.p = j
g.s = h
g.o = h
g.u = i
g.r = m
g.x = m
c.s = h
c.p = h
c.q = j
c.z = d
c.u = l
j.q = h
j.o = k
m.y = c
m.o = d
m.t = l
d.o = c
d.w = j
d.y = j
d.r = g
d.p = g
d.q = h
d.t = k
e.o = c
e.w = k
e.t = k
e.y = j
e.r = g
e.p = g
e.q = h
i.s = h
i.p = h
i.q = k
i.z = e
i.u = l
k.q = h
k.o = j
assert j.q.v.v.t.txt == "l"