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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: D = None
        self.r: G = None
        self.u: E = None
        self.w: A = None
        self.z: C = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: F = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: C = None
        self.s: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: D = None
        self.r: G = None
        self.u: E = None
        self.w: A = None
        self.z: C = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: F = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: C = None
        self.s: G = None
        self.txt = txt

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

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