class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: H = None
        self.s: G = None
        self.u: B = None
        self.y: H = None
        self.o: C = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: I = None
        self.r: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: I = None
        self.x: B = None
        self.v: I = None
        self.w: E = None
        self.p: D = None
        self.u: D = None
        self.t: I = None
        self.s: C = None
        self.txt = txt

k = A("k")
b = B("b")
m = C("m")
f = D("f")
n = E("n")
c = F("c")
i = G("i")
g = H("g")
a = I("a")
h = I("h")

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: I = None
        self.r: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: I = None
        self.x: B = None
        self.v: I = None
        self.w: E = None
        self.p: D = None
        self.u: D = None
        self.t: I = None
        self.s: C = None
        self.txt = txt

k = A("k")
b = B("b")
m = C("m")
f = D("f")
n = E("n")
c = F("c")
i = G("i")
g = H("g")
a = I("a")
h = I("h")

k.q = i
k.s = i
k.x = g
k.y = g
k.u = b
k.o = m
k.t = n
b.y = n
m.q = c
m.t = a
m.r = h
f.y = b
f.w = b
f.z = h
n.x = i
c.x = a
c.w = g
i.x = h
g.s = f
a.q = n
a.w = n
a.o = h
a.v = h
a.t = h
a.x = b
a.p = f
a.u = f
a.s = m
h.q = n
h.w = n
h.o = a
h.v = a
h.t = a
h.x = b
h.p = f
h.u = f
h.s = m
assert n.x.x.t.v.x.txt == "b"