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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: I = None
        self.p: C = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: F = None
        self.r: A = None
        self.v: A = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: H = None
        self.o: D = None
        self.u: A = None
        self.q: E = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: A = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: D = None
        self.txt = txt

j = A("j")
i = B("i")
g = C("g")
k = D("k")
h = E("h")
d = F("d")
e = G("e")
a = H("a")
c = I("c")

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: I = None
        self.p: C = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: F = None
        self.r: A = None
        self.v: A = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: H = None
        self.o: D = None
        self.u: A = None
        self.q: E = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: A = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: D = None
        self.txt = txt

j = A("j")
i = B("i")
g = C("g")
k = D("k")
h = E("h")
d = F("d")
e = G("e")
a = H("a")
c = I("c")

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