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

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: F = None
        self.u: F = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: G = None
        self.p: C = None
        self.y: B = None
        self.t: C = None
        self.r: B = None
        self.u: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: F = None
        self.u: F = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: G = None
        self.p: C = None
        self.y: B = None
        self.t: C = None
        self.r: B = None
        self.u: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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