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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: I = None
        self.r: D = None
        self.u: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: A = None
        self.s: E = None
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: D = None
        self.v: G = None
        self.w: C = None
        self.t: B = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: I = None
        self.r: D = None
        self.u: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: A = None
        self.s: E = None
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: D = None
        self.v: G = None
        self.w: C = None
        self.t: B = None
        self.x: E = None
        self.txt = txt

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

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