class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: B = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: C = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: F = None
        self.z: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: C = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: F = None
        self.z: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: G = None
        self.txt = txt

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

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

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