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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: D = None
        self.r: D = None
        self.u: A = None
        self.v: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: F = None
        self.o: A = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: B = None
        self.y: D = None
        self.q: G = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: D = None
        self.x: G = None
        self.y: B = None
        self.p: F = None
        self.v: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: D = None
        self.r: D = None
        self.u: A = None
        self.v: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: F = None
        self.o: A = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: B = None
        self.y: D = None
        self.q: G = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: D = None
        self.x: G = None
        self.y: B = None
        self.p: F = None
        self.v: B = None
        self.txt = txt

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

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