class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: D = None
        self.t: E = None
        self.x: D = None
        self.y: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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