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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: A = None
        self.w: G = None
        self.u: A = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: F = None
        self.y: G = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: G = None
        self.w: I = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: B = None
        self.x: H = None
        self.y: B = None
        self.s: C = None
        self.u: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: A = None
        self.w: G = None
        self.u: A = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: F = None
        self.y: G = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: G = None
        self.w: I = None
        self.y: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: B = None
        self.x: H = None
        self.y: B = None
        self.s: C = None
        self.u: G = None
        self.txt = txt

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

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