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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: I = None
        self.y: A = None
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: E = None
        self.u: G = None
        self.v: A = None
        self.r: C = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: E = None
        self.w: G = None
        self.u: C = None
        self.y: A = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: A = None
        self.s: A = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: A = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: G = None
        self.z: E = None
        self.r: A = None
        self.x: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: I = None
        self.y: A = None
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: E = None
        self.u: G = None
        self.v: A = None
        self.r: C = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: E = None
        self.w: G = None
        self.u: C = None
        self.y: A = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: A = None
        self.s: A = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: A = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: G = None
        self.z: E = None
        self.r: A = None
        self.x: E = None
        self.txt = txt

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

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