class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: D = None
        self.q: B = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: D = None
        self.p: E = None
        self.w: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: B = None
        self.o: B = None
        self.v: G = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: B = None
        self.q: D = None
        self.v: B = None
        self.txt = txt

f = A("f")
j = B("j")
g = C("g")
i = D("i")
h = E("h")
c = F("c")
e = G("e")
a = D("a")
b = F("b")

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: D = None
        self.p: E = None
        self.w: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: B = None
        self.o: B = None
        self.v: G = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: B = None
        self.q: D = None
        self.v: B = None
        self.txt = txt

f = A("f")
j = B("j")
g = C("g")
i = D("i")
h = E("h")
c = F("c")
e = G("e")
a = D("a")
b = F("b")

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