class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: C = None
        self.z: G = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: C = None
        self.z: A = None
        self.r: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: B = None
        self.x: A = None
        self.r: E = None
        self.w: A = None
        self.s: C = None
        self.txt = txt

i = A("i")
a = B("a")
h = C("h")
d = D("d")
k = E("k")
g = F("g")
m = G("m")
f = C("f")

i.x = g
i.r = h
i.z = m
i.v = f
a.p = m
a.r = m
a.q = h
a.z = i
h.q = g
h.o = g
h.u = d
h.t = i
h.p = a
h.w = k
h.s = f
d.r = k
k.r = i
k.q = i
k.u = a
g.t = i
g.y = k
g.z = k
g.v = k
g.q = k
g.r = k
g.w = a
m.v = a
m.y = a
m.x = i
m.w = i
m.r = k
m.s = f
f.q = g
f.o = g
f.u = d
f.t = i
f.p = a
f.w = k
f.s = h
assert i.v.p.z.x.w.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: C = None
        self.z: G = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: C = None
        self.z: A = None
        self.r: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: B = None
        self.x: A = None
        self.r: E = None
        self.w: A = None
        self.s: C = None
        self.txt = txt

i = A("i")
a = B("a")
h = C("h")
d = D("d")
k = E("k")
g = F("g")
m = G("m")
f = C("f")

i.x = g
i.r = h
i.z = m
i.v = f
a.p = m
a.r = m
a.q = h
a.z = i
h.q = g
h.o = g
h.u = d
h.t = i
h.p = a
h.w = k
h.s = f
d.r = k
k.r = i
k.q = i
k.u = a
g.t = i
g.y = k
g.z = k
g.v = k
g.q = k
g.r = k
g.w = a
m.v = a
m.y = a
m.x = i
m.w = i
m.r = k
m.s = f
f.q = g
f.o = g
f.u = d
f.t = i
f.p = a
f.w = k
f.s = h
assert i.v.p.z.x.w.txt == "a"