class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: B = None
        self.q: C = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: E = None
        self.r: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: I = None
        self.z: A = None
        self.p: B = None
        self.t: B = None
        self.s: H = None
        self.v: G = None
        self.o: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: E = None
        self.r: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: I = None
        self.z: A = None
        self.p: B = None
        self.t: B = None
        self.s: H = None
        self.v: G = None
        self.o: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

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