class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: I = None
        self.t: A = None
        self.z: D = None
        self.s: H = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: B = None
        self.r: F = None
        self.s: I = None
        self.z: D = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: H = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: B = None
        self.v: F = None
        self.o: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: F = None
        self.t: D = None
        self.v: C = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: C = None
        self.r: F = None
        self.z: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: I = None
        self.t: A = None
        self.z: D = None
        self.s: H = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: B = None
        self.r: F = None
        self.s: I = None
        self.z: D = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: H = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: B = None
        self.v: F = None
        self.o: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: F = None
        self.t: D = None
        self.v: C = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: C = None
        self.r: F = None
        self.z: H = None
        self.txt = txt

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

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