class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: C = None
        self.t: B = None
        self.r: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: D = None
        self.t: G = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: A = None
        self.p: A = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: D = None
        self.t: G = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: A = None
        self.p: A = None
        self.q: E = None
        self.txt = txt

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

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