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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: F = None
        self.w: D = None
        self.v: G = None
        self.q: F = None
        self.p: H = None
        self.txt = txt

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

b.t = n
i.y = k
i.z = h
c.y = n
c.w = k
f.q = c
h.q = f
h.r = k
n.w = i
n.y = g
n.p = g
n.x = g
d.x = h
d.o = h
d.r = g
g.v = f
g.z = f
a.x = g
a.p = g
a.z = n
a.q = n
a.w = f
a.v = d
k.y = i
k.z = h
assert a.x.z.q.y.p.z.q.w.txt == "
class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: F = None
        self.w: D = None
        self.v: G = None
        self.q: F = None
        self.p: H = None
        self.txt = txt

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

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