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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: G = None
        self.w: D = None
        self.p: G = None
        self.s: E = None
        self.x: A = None
        self.r: I = None
        self.v: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: D = None
        self.r: A = None
        self.x: B = None
        self.o: C = None
        self.y: G = None
        self.v: C = None
        self.z: I = None
        self.q: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: B = None
        self.p: I = None
        self.r: C = None
        self.t: I = None
        self.y: H = None
        self.o: E = None
        self.z: D = None
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: F = None
        self.w: E = None
        self.s: F = None
        self.o: F = None
        self.z: D = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: H = None
        self.w: E = None
        self.y: E = None
        self.u: A = None
        self.r: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: G = None
        self.w: D = None
        self.p: G = None
        self.s: E = None
        self.x: A = None
        self.r: I = None
        self.v: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: D = None
        self.r: A = None
        self.x: B = None
        self.o: C = None
        self.y: G = None
        self.v: C = None
        self.z: I = None
        self.q: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: B = None
        self.p: I = None
        self.r: C = None
        self.t: I = None
        self.y: H = None
        self.o: E = None
        self.z: D = None
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: F = None
        self.w: E = None
        self.s: F = None
        self.o: F = None
        self.z: D = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: H = None
        self.w: E = None
        self.y: E = None
        self.u: A = None
        self.r: A = None
        self.txt = txt

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

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