class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: B = None
        self.v: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: C = None
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: C = None
        self.t: F = None
        self.txt = txt

e = A("e")
k = B("k")
g = C("g")
l = D("l")
f = E("f")
a = F("a")
m = G("m")
j = A("j")

e.y = m
e.q = k
e.v = f
k.s = a
k.v = e
k.z = m
g.v = f
g.t = m
l.u = g
l.z = a
f.r = l
f.x = g
f.w = j
a.q = g
a.z = k
a.t = l
m.u = f
m.o = g
m.t = a
j.y = m
j.q = k
j.v = f
assert a.t.u.t.u.x.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: B = None
        self.v: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: C = None
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: C = None
        self.t: F = None
        self.txt = txt

e = A("e")
k = B("k")
g = C("g")
l = D("l")
f = E("f")
a = F("a")
m = G("m")
j = A("j")

e.y = m
e.q = k
e.v = f
k.s = a
k.v = e
k.z = m
g.v = f
g.t = m
l.u = g
l.z = a
f.r = l
f.x = g
f.w = j
a.q = g
a.z = k
a.t = l
m.u = f
m.o = g
m.t = a
j.y = m
j.q = k
j.v = f
assert a.t.u.t.u.x.v.x.txt == "g"