class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: E = None
        self.q: A = None
        self.y: E = None
        self.w: A = None
        self.v: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: D = None
        self.r: D = None
        self.v: F = None
        self.w: C = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: C = None
        self.q: C = None
        self.y: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: D = None
        self.r: D = None
        self.v: F = None
        self.w: C = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: C = None
        self.q: C = None
        self.y: E = None
        self.txt = txt

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

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

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