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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: A = None
        self.w: F = None
        self.v: H = None
        self.y: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: C = None
        self.v: C = None
        self.s: G = None
        self.u: G = None
        self.x: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: D = None
        self.y: C = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: A = None
        self.w: F = None
        self.v: H = None
        self.y: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: C = None
        self.v: C = None
        self.s: G = None
        self.u: G = None
        self.x: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: D = None
        self.y: C = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: C = None
        self.txt = txt

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

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

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