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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: B = None
        self.q: D = None
        self.z: F = None
        self.x: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: C = None
        self.t: G = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: E = None
        self.r: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: B = None
        self.q: D = None
        self.z: F = None
        self.x: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: C = None
        self.t: G = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: E = None
        self.r: E = None
        self.txt = txt

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

g.v = d
m.q = d
j.p = m
j.s = m
j.q = k
j.z = a
j.x = n
k.t = l
k.o = l
k.w = c
k.r = c
k.u = m
k.v = j
k.x = d
l.z = m
l.r = g
a.x = n
a.t = n
a.u = j
a.z = k
n.v = k
n.q = l
n.r = l
c.t = l
c.o = l
c.w = k
c.r = k
c.u = m
c.v = j
c.x = d
d.x = n
d.t = n
d.u = j
d.z = k
assert l.z.q.z.txt == "k"